Reputation: 25
I have a problem when I try to build my game it shows me this error: java.io.IOException: Can't read [C:\Users\niksr\OneDrive\Documents\Unity\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-33\optional\android.car.jar] (Can't process class [android/car/Car$CarServiceLifecycleListener.class] (Unsupported version number [55.0] (maximum 54.0, Java 10))) See the Console for Details.
Before this, I was able to build my game. I was really close to publish it on play store, but it said "Your app currently targets API level 30 and must target at least API level 31 to ensure it is built on the latest APIs optimized for security and performance. Change your app's target API level to at least 31.". I changed it to 33, but then I tried to build my game and this error showed up. After that, I changed it back to the original API level, but this error still showed up. I don't know why this error persists, but please help me solve this problem.
Upvotes: 0
Views: 3392
Reputation: 1
What worked for me is to switch off 'minify'. Go to Player Settings > Publish Settings > Minify (bottom part) and switch off all options.
Upvotes: 0
Reputation: 1
Another option is to build it with Andriod Studio. Install Android Studio with api 33.
set api 33 in the player settings at the project. Then at build settings select export project.
Open de exported folder in android studio. Find a error about the code line
enableR8=false
Delete that line as it is outdated.
And follow the appropriate build steps for you.
Upvotes: 0
Reputation: 11
I was able to get rid of it by enabling 'Use R8' but then Google Play won't accept my ReTrace mapping file.
Upvotes: 1
Reputation: 1
I had the same issue. Reverting back to API 32 solved the issue and had no feedback from google.
In case you still have the issue try installing API 32 with the commandline(first remove the folder in the platforms folder).
I installed API 32 with commandline with the sdk manager.
go to where the sdk is installed in your case:
C:\Users\niksr\OneDrive\Documents\Unity\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK
Then run:
./cmdline-tools/2.1/bin/sdkmanager "platforms;android-32"
Upvotes: 0