Android developers often encounter errors related to SDK versions when publishing apps on Google Play. One of the most common issues is a target SDK mismatch, which prevents submission until updated. This guide explains how to fix the “targetSdkVersion too low” error in Android Studio and get your app ready for Play Store compliance.
1. Understand the Error
When uploading your app to Google Play, you may see an error like:
Your app targets API level 30 and must target at least API level 33 to meet the Play Store’s requirements.
This means your app’s targetSdkVersion
in the build.gradle
file is outdated.
2. Open Your Project in Android Studio
Launch Android Studio and open your project. Navigate to:
app > build.gradle (Module: app)
3. Update targetSdkVersion
Find the following lines and update accordingly:
android {
compileSdk 34
defaultConfig {
targetSdk 34
minSdk 21
}
}
Make sure you’re using the latest SDK version available in Android Studio.
4. Sync the Project
After making changes, click “Sync Now” at the top of the file to apply the updates.
5. Update compileSdk and Build Tools
Go to SDK Manager and install the latest SDK and build tools. Also ensure:
classpath 'com.android.tools.build:gradle:8.2.0'
in your build.gradle (Project)
is updated.
6. Rebuild and Test Your App
Click Build > Rebuild Project to ensure everything compiles correctly. Run the app on an emulator or device.
7. Generate a New APK or AAB
Use Build > Build Bundle(s) / APK(s) to generate your new package, now compatible with Google Play’s requirements.
8. Upload to Google Play Console
Log in to [Google Play Console](https://play.google.com/console/about/) and upload your APK or AAB. The target SDK warning should no longer appear.
9. Conclusion
Keeping your targetSdkVersion
updated is mandatory for publishing apps on Google Play. Regularly checking Android developer updates ensures compatibility and a smooth publishing process.
More Resources
For updated SDK targets and requirements, visit:
🔗 Android 14 Behavior Changes
🔗 Target API Level Requirements