October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
Mountain View desk5 min

How to Fix Android Build Errors After Raising targetSdkVersion to API 36

Raising targetSdk to API 36 can expose toolchain, SDK, dependency, or runtime issues. Find the failing build stage and check the matching fix.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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 compileSdk and targetSdk.
  • 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

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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

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_HOME and any org.gradle.java.home setting.
  • 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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

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

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • 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

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.