Every time I need to make upgrades in Android studio I face problems. Here is the last one (gradle 8.1.0, SDK 33, target and compile versions to 33, all installed and working fine).
The inspection now gives me
Not targeting the latest versions of Android
I then change both targetSdkVersion
and compileSdk
to 34, and then says (after a gradle error in inspection):
It looks like you just edited the targetSdkVersion from 33 to 34 in the editor. Be sure to consult the documentation on the behaviors that change as result of this. The Android SDK Upgrade Assistant can help with safely migrating.
I then run the Android SDK Upgrade Assistant, and says nothing about the upgrade to 34.
Still, my project builds with target 34. Yet, Build tells me:
You are strongly encouraged to update your project to use a newer Android Gradle plugin that has been tested with compileSdk = 34.
I then try to upgrade gradle by running the AGP upgrade assistant
and it says gradle 8.1 is up to date, despite the fact that there is already a gradle 8.2.1.
It is quite hard to use Android Studio in a productive way.
What am I doing wrong? How can I handle all these inconsistencies? Should I wait for the software to warn me about certain updates outside the inspection?
EDIT
A second problem, even staying with 33:
Inspection gives me:
A newer version of androidx.appcompat:appcompat than 1.7.0-alpha02 is available: 1.7.0-alpha03
I change to alpha03, try to build and then it fails giving:
Dependency 'androidx.appcompat:appcompat-resources:1.7.0-alpha03' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs.
Yet it does not allow me to upgrade to 34... The only solution I found was to stay with the old alpha02 and ignore the inspection.