1

I'm trying to update to SDK 35 and I'm getting this error.

Error in /Users/xxx/Library/Android/sdk/platforms/android-35/android.jar:java/lang/Boolean.class: java.lang.NullPointerException

AGPBI: {"kind":"error","text":"java.lang.NullPointerException","sources":[{"file":"/Users/xxx/Library/Android/sdk/platforms/android-35/android.jar"}],"tool":"D8"}

I have this config dependencies { classpath 'com.android.tools.build:gradle:7.2.2'} but i don't want to upgrade 'cause then everything breaks. Is there another solution? This happened to someone? Thank you.

1 Answer 1

1

As per the Minimum version of tools for Android API level, the highest supported API level for the AGP 7.2.2 that you are using is API 33.

As explained there:

Using lower versions of Android Studio or AGP than required by your project's targetSdk or compileSdk could lead to unexpected issues.

The issue you are experiencing is one of those kind of issues. You'll want to upgrade to at least AGP 8.6.0 to compile with API 35 (or AGP 8.9.1 if you want to prepare for API 36, which is already out):

dependencies {
  classpath 'com.android.tools.build:gradle:8.6.0'
}

The easiest way to upgrade is to incrementally upgrade it, one version at a time (e.g., to 8.0, 8.2, etc.) so that you aren't changing too many things at once and can ask questions about each problem you run into.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for your advice, it solved my issue smoothly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.