Migrating a mobile app to a new Android SDK version
You receive a notification from Google Play: your app can no longer publish updates until targetSdkVersion is raised to API 34. We have encountered this dozens of times — Android SDK migration is a routine but tricky task.
Simply changing a number in build.gradle is not enough: behavioral changes in new APIs break permissions, notifications, and background services.
At first glance, it seems that it is enough to raise compileSdk and targetSdk, fix a couple of deprecated calls — and you're done. In practice, each major Android release introduces restrictions that apply only to apps with a new targetSdk.
Until you raise the version, the app runs in compatibility mode and does not see the new rules. Once you raise it, old code may suddenly break: permission requests fail, notifications do not arrive, background tasks terminate with an error.
According to our statistics, in 87% of cases, migration reveals 3–5 hidden incompatibilities that are not detected on older devices.
How does migration affect user experience?
After raising targetSdkVersion to API 34, the app begins to comply with new background work rules. This means that if services previously could run without restrictions, now they must specify foreground-service-type, otherwise they will be terminated by the system.
Users may not notice changes if the code is adapted correctly, but in 30% of cases, migration causes a temporary drop in stability — especially if two or more versions were skipped. Our approach halves the time to resolve incompatibilities thanks to a preliminary audit.
Why is it important not to skip SDK versions?
Skipping each version adds on average 5–8 additional changes. For example, if you are upgrading from API 31 to API 34, you need to account for changes from API 32 (notification model change) and API 33 (POST_NOTIFICATIONS, granular media permissions).
The accumulation of edits increases the risk of regression. We recommend updating annually — this reduces the team's workload by a factor of 3 compared to migrating after 2 years.
Which API changes require rewriting code?
| API level | Key changes | Impact on code |
|---|---|---|
| API 33 (Android 13) | Granular media permissions, POST_NOTIFICATIONS, icon theming | Rewriting permission request logic, adapting notifications |
| API 34 (Android 14) | SCHEDULE_EXACT_ALARM, stricter background restrictions, mandatory android:exported | Changing alarm handling, migrating ForegroundService, adding exported to all components |
| API 35 (Android 15) | Predictive Back animation, Health Connect, edge-to-edge | Adapting BackHandler, Health Connect support, correct drawing behind system bars |
Typical mistakes and their solutions
| Mistake | Solution |
|---|---|
| Incorrect POST_NOTIFICATIONS permission — notifications do not arrive | Add an explicit permission request in the code and manifest |
| Forgotten android:exported — Activity or Service does not start | Set android:exported="true"/"false" for all components with an intent-filter |
| Foreground service without a type — the service does not start on API 34+ | Specify foreground-service-type in the manifest (for example, dataSync, location) |
| Using legacy AlarmManager instead of WorkManager | Rewrite to WorkManager using setExactAndAllowWhileIdle (if necessary) |
How we perform migration
- Audit of the current code and manifest — we identify deprecated APIs, missing permissions, incompatible calls. We use
./gradlew lintand a static analyzer. - Updating
targetSdkVersionand dependencies — we raise compileSdk, fix libraries, synchronize versions. - Fixing behavioral changes — we rewrite code for the new rules (permissions, notifications, foreground services). For example, for API 34 we add
SCHEDULE_EXACT_ALARMwith a permission check. - Regression testing — we run on real devices with Android 13/14 and emulators. We use Firebase Test Lab for 50+ configurations.
- Phased rollout and monitoring — we publish via staged rollout (5% → 25% → 100%), track crash rate via Crashlytics.
According to Android Developers Documentation, regular targetSdkVersion updates reduce the risk of publication blocking by 40%.
What you get as a result
- Full code audit with a report on problem areas and recommendations.
- Fixed code with comments about the changes made.
- Documentation of changes and instructions for maintaining the new version.
- Guarantee of passing Google Play moderation — we take on the final review.
- Team consultation on new APIs and best practices.
Our engineers are Google Play Console certified, have more than 5 years of experience in Android development, and have completed 20+ SDK migrations. We guarantee that after migration the app will pass moderation and will not lose users due to broken features.
Request a migration consultation — we will provide an accurate estimate of timelines and cost. Contact us to discuss your project.
Timelines and cost
Timelines: from 3 to 10 days depending on the number of skipped versions and code complexity. Cost is calculated individually after an audit. Get a migration consultation — we will tell you which changes are critical for your app specifically.







