Jetpack Compose Tutorial for Android: Getting Started | raywenderlich.com

In this Jetpack Compose tutorial, you’ll learn to use the new declarative UI framework being developed by the Android team by creating a cookbook app.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/15361077-jetpack-compose-tutorial-for-android-getting-started

Hi, I’m trying to work through the above tutorial, however when I attempt to use the latest Canary build (AcrcticFox 2020.3.1 Canary 2) I’m prompted to upgrade to the compatible version of Gradle Plugin 7.0.0-alpha02.

The following commands are executed to upgrade the project from Android Gradle Plugin version 4.2.0-alpha15 to version 7.0.0-alpha02:
*Upgrade Gradle version to 6.71
*Upgrade AGP dependency from 4.2.0-alpha15 to 7.0.0-alpha02

The upgrade seems to complete and there are no errors when I Sync the project Gradle files.

However when I attempt to run the base starter application I get the following build failure:

    Build file '/Users/mmacias/Downloads/rayWenderlich/materials/starter/app/build.gradle' line: 1

A problem occurred evaluating project ':app'.
> Failed to apply plugin 'com.android.internal.application'.
   > com.android.builder.errors.EvalIssueException: The option 'android.enableBuildCache' is deprecated.
     The current default is 'false'.
     It was removed in version 7.0 of the Android Gradle plugin.
     The Android-specific build caches are superseded by the Gradle build cache https://docs.gradle.org/current/userguide/build_cache.html

Anyone know how to get this to work?

@migstertech I was also running into this, and was able to get it working by removing android.enableBuildCache (regardless of whether it’s set to true or false). I was confused because I did not have this set in my project gradle.properties, but realized I did have it set in my ~/.gradle/gradle.properties. Once I removed it from there I was able to get past this issue.

1 Like