Start with the first actionable error in the build output, then identify when it occurs: Gradle startup, plugin configuration, SDK lookup, dependency resolution, compilation, packaging, or only after the app launches. The right fix depends on that stage. Raising targetSdkVersion alone does not identify the cause: targetSdk controls runtime behavior, while compileSdk determines which Android APIs are available to compile against.
Record the failing build and its environment
Before changing versions, capture the command or action that fails and the first meaningful error around it. Later messages in a stack trace may be consequences rather than the cause. Note whether the failure happens during Android Studio sync, a command-line Gradle task, CI, or packaging/upload, and record:
- The module and build variant.
- The Gradle wrapper and Android Gradle Plugin (AGP) versions.
- The Android Studio version, if it is involved.
- The JDK Gradle actually uses in that environment.
- The module’s
compileSdkandtargetSdk. - The installed SDK platform and Build-Tools packages, plus the SDK directory used by the failing build.
- Any recently changed dependency, Gradle plugin, or custom build logic named in the error.
Android Studio, a local terminal, and CI may use different JDKs or SDK directories. Details from the failing environment matter more than settings visible in a different one.
What AGP version do I need for API 36?
API 36 is Android 16. The Android 16 SDK setup guide asks for AGP 8.9.0-rc01 or later, while Android’s API compatibility table lists stable AGP 8.9.1 as the minimum for API 36. For a stable toolchain, use the compatibility table’s stable minimum and check that your Android Studio version supports it: the table lists Meerkat 2024.3.1 Patch 1 or newer for API 36. The setup guide describes Meerkat 2024.3.1 or higher as the best development experience. These are distinct thresholds: a prerelease AGP floor in setup guidance is not the same as the stable minimum in the compatibility table. Android 16 SDK setup · AGP and API-level compatibility table
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware match#1 Best Overall
AGP and Gradle versions must be a supported pair. Check the requirements for the AGP release you choose, then set the Gradle wrapper distribution in gradle/wrapper/gradle-wrapper.properties accordingly; do not update the wrapper independently to an arbitrary latest version. Android warns that using Android Studio or AGP versions lower than those required by a project’s targetSdk or compileSdk can lead to unexpected issues. About the Android Gradle plugin
If you use Android Studio’s upgrade assistant, review its proposed coordinated changes before applying them. Older third-party or internal plugins may rely on AGP internals or APIs that changed between releases. Check the chosen AGP’s release notes and compatibility requirements for Gradle, Android Studio, Build-Tools, NDK, JDK, and plugins. Update AGP and Gradle
Rank #2
Why does Gradle say Android Gradle plugin requires Java 17?
AGP 8.x requires JDK 17 to run. Android’s documented example of the mismatch is: “Android Gradle plugin requires Java 17 to run. You are currently using Java 11.” Check the JDK used by the failing Gradle process, not merely which Java versions are installed. Java versions in Android builds
- Android Studio: Check the Gradle JDK setting used by the project.
- Command line: Check the environment’s
JAVA_HOMEand anyorg.gradle.java.homesetting. - CI: Check the JDK configured for the job that runs Gradle; it may differ from your workstation.
Point the failing build to JDK 17 or newer when using AGP 8.x, while confirming the rest of the build is compatible with that JDK. Changing a terminal’s Java setting will not fix an Android Studio or CI build that uses another runtime.
Recommended Free Tools
Why can’t Gradle find Android SDK Platform 36?
Install Android SDK Platform 36 and a suitable Android SDK Build-Tools 36.x package, then verify that the failing build uses the SDK directory where those packages were installed. Android Studio, a local command-line build, and CI can point to separate SDK roots; installing Platform 36 in one does not make it available in another. The official API 36 setup guide provides the SDK Manager path and configuration examples for Groovy and Kotlin DSL. Install the Android 16 SDK
If the app needs to compile against API 36, set compileSdk = 36 in the relevant app module. Keep it conceptually separate from targetSdk: raising the target changes runtime behavior for users, but it does not by itself make API 36 available to the compiler or install the SDK platform.
What if the error names a dependency or plugin?
When the AGP/Gradle pairing, JDK, and SDK platform are correct, follow the first error that identifies a dependency or plugin. An Android library may require a higher compileSdk; a plugin may require a newer Gradle or AGP; custom build logic may use an AGP API that has changed. Check the named component’s compatibility notes and update the component implicated by the error rather than changing unrelated parts of the toolchain. Android’s upgrade guidance also calls out Build-Tools, NDK, JDK, IDE, and plugin compatibility as items to check. Android Gradle plugin upgrade guidance
Why does the build pass but the app look different on Android 16?
A successful build followed by different layout or navigation is a runtime migration issue, not a Gradle-version error. On Android 16 devices, apps targeting API 36 can encounter changes including enforced edge-to-edge behavior, predictive-back system animations enabled by default, and changes to orientation, resizability, and aspect-ratio restrictions on displays with a smallest width of at least 600 dp, subject to documented exceptions. Check the Android 16 behavior change documentation and migration guide, then test the relevant screens and navigation on an Android 16 device or emulator. Android 16 behavior changes · Migrate apps to Android 16
Best Value
- For edge-to-edge changes, inspect how the app handles system-bar insets and content that draws behind system bars.
- For predictive back, test back navigation and update the app’s back-navigation handling where needed.
- For large-screen changes, test on displays at or above the documented 600 dp smallest-width threshold and review assumptions about fixed orientation, resizing, or aspect ratio.
Android’s migration guidance recommends testing on a device or emulator and using compatibility toggles to isolate behavior changes. These toggles help focus tests; they do not replace testing the final target-SDK behavior. Android 16 migration guidance
Does the project include native libraries?
If the app or an SDK bundles native .so files, treat native compatibility as a separate check from a Gradle or targetSdkVersion failure. Check the SDK vendor’s 16 KB page-size support and Android’s guidance for inspecting and aligning native libraries. Android 16 has a compatibility mode for some apps built for 4 KB pages, but Android recommends 16 KB alignment for better performance, reliability, and stability. Do not attribute a native packaging or alignment failure to the target-SDK change unless the specific error supports that diagnosis. Support 16 KB page sizes
Do you need API 36 for Google Play?
As of October 4, 2026, Google Play’s policy says that starting August 31, 2026, new apps and app updates must target API 36 or higher. The policy lists exceptions: Wear OS and Android Automotive OS require API 35 or higher, while Android TV and Android XR require API 34 or higher. It also describes a possible extension to November 1, 2026, with extension forms expected in Play Console later in the year. Check the current requirement for your app category and the status shown in your Play Console account. Google Play target API level requirements
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →




