General Update
Updated necessary dependencies (libraries, AGP, Gradle) and build and property files to the latest version, due the lack of updates since some years. Prepares support for modern Android platforms > 28
The new dependencies require to install the latest Android Studio build, i.e. side-by-side via JetBrains Toolbox (suggested), via a package manager (apt, brew, winget, etc.), or manually.
For the version dependencies mentioned below Android Studio Narwhal Feature Drop 2025.1.2 Nightly is highly recommended. Also, the JVM used inside Android Studio and Gradle scripts should be aligned (use AGP migration helper or project settings), i.e. by using the bundled JVM of IntelliJ.
Some errors must be fixed on first project import using Android Studio Narwhal Feature Drop. DO NOT USE OLD ANDROID STUDIO BUILDS due incompatibilities and end of life policy (critical CVS's may not be fixed).
A side-by-side installation and a optional branch - during migration and testing - can help.
Selected Changes:
- Updated AGP to from 3.4.2 to 8.10.0
- Updated Gradle from 5.2.1-all to 8.14-all
- Updated minSdk from 14 to 16 (required)
- Updated
build.gradleand different sections:pluginsinstead apply,namespaceinstead package name,lintinstead of lintOptions, equal sign to assign properties - Updated
buildFeaturesandsourceSets(required for newbuildConfigand to supportaidlin the future; otherwise .aidl files are ignored) - Updated old alpha and beta dependencies in
build.gradleto their release variants - Updated outdated
android.arch.work:work-runtime:1.0.1withandroidx.work:work-runtime:2.0.1 - Enabled
multiDexand desugaring (backports modern Java 7+ core functions and selected API's to old devices during build time) inbuild.gradleandAppclass - Removed deprecated
mavenCentral(); addedgradlePluginPortal() - Replaced
switchblocks with non-constant resource values with if-else if-else(enforced with newer build tools) - Replaced 3 private color resources due Theme change (now in
colors.xml) - Fixed minus with dash in
strings.xml - Added required
exportattribute to selected activity definitions inAndroidManifest.xml - Added default
CookieHandler(not set on all old systems) to App class - Replaced
TargetApiannotations with newerRequiresApiannotation; addedDiscouragedPrivateApiin CompatUtils - Minor Cleancode: unused imports, dead code
Environment Android Studio Narwhal Feature Drop 2025.1.2 Nightly Build #AI-251.25410.109.2512.13515449, built on May 19, 2025 Runtime version: 21.0.6+-13391695-b895.109 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. (built-in) OS: Windows 11 64-bit (de) / Build 24H2