Search code examples
android-studiogradlekotlinlibgdxkapt

Error: Cannot change attributes of configuration ':android:kapt' after it has been resolved when update Android Studio to 3.2


Today I updated Android Studio to 3.2 and got this error:

Cannot change attributes of configuration ':android:kapt' after it has been resolved

I've tried searching a few similar errors to "cannot change attritubtes of configuration...after it has been resovled" out there but none of them worked for me.

I have configureOnDemand set to false in gradle.properties and both of my repositories blocks look like this:

mavenLocal()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
jcenter()
google()

Update: I narrowed it down to the cause of updating build gradle to 3.2. So I will have to use 3.1 for now.


Solution

  • As I see you've problem in your LibGDX project (From your attached build.gradle file)


    Cannot change attributes of configuration ':android:kapt' after it has been resolved.

    is an issue that has been resolved by detaching native task by this commit.

    Solution :

    1. If you're going to create new project use latest build of LibGDX 1.9.8
    2. Else make required changes in android build.gradle file (For reference you can use this)