Skip to content

Upgrade for Android Studio 2024.1.1, Gradle 8.7, JDK 17 #50

Open
@StevanWhite

Description

@StevanWhite

This is just to make it easier for you, if and when you choose to update.
(Probably better sooner than later)

I have done this. It builds and runs well, near as I can tell.
It wasn't very hard --- but there were pitfalls.

Start with the AGP Upgrade Assistant.

After recommended update to Gradle plugin 7.4.2?,

Update all library dependencies.

Then run AGP Upgrade Assistant again to update Gradle to 8.5.
See a warning:

The option setting 'android.defaults.buildfeatures.buildconfig=true' is deprecated.

Removed that line from config.

Some other suggestions do actually seem to improve build time:

android.enableJetifier=false
org.gradle.configuration-cache=true

At this point, build will complain:

Cannot find symbol BuildConfig

Added to build.gradle inside android{},

buildFeatures {
    buildConfig = true
}

At this point, it builds, and has basic functionality. Anyway I browsed around, clicked on things, added bookmarks, etc.
(I don't know your testing procedures.)

I went on to bump the JDK versions to 17.
Don't forget:

kotlinOptions {
    jvmTarget = '17'
}

(You may have to check that Gradle is using the Studio distribution jbr 17.)

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions