Andrew Fletcher published: 1 August 2022 1 minute read
Android Studio build errors
Build failed error: cannot find symbol if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R)
or
cannot find symbol Build.VERSION.SDK_INT >= Build.VERSION_CODES.S &&
To resolve - upgrade the compileSdkVersion and targetSdkVersion to 31 in your grade file. Note, this setting could be in one of the following files
- android/app/build.gradle
- android/variables.gradle
Also note - Build.VERSION_CODES.R only exists in API 30.
The compileSdkVersion should be set to 30 if you want to use Build.VERSION_CODES.R.
Update for cordova-android@10... As of cordova-android@10, compileSdkVersion has been removed android-targetSdkVersion is unified to set both the target & compile SDK versions so that they always remain consistent.
Related articles
Andrew Fletcher
•
31 Oct 2023
Android icon not changing
If the Android app icon is not changing from the default icon (in my situation this was the Capacitor icon), here are some steps to troubleshoot and resolve the issue: Check the Icon FilesEnsure that you have provided the correct icon files in the appropriate directory. In a Capacitor project,...
Andrew Fletcher
•
27 Oct 2023
Working through android.permission.REQUEST_INSTALL_PACKAGES blocking releases
I'm receiving an issue with a previous release on Google Playandroid.permission.REQUEST_INSTALL_PACKAGESI'm seeing the following message in Google PlayRequest install packages permission
error - Not started - Your app isn't compliant
A permission that allows your app to install packages. If your...
Andrew Fletcher
•
25 Oct 2023
keytool error: java.io.IOException: keystore password was incorrect
The "keystore password was incorrect" error in keytool indicates that the password you provided when trying to access or modify a keystore is incorrect. To resolve this issue, you can follow these steps: Verify the Correct PasswordDouble-check that you are entering the correct password for the...