Sherlock
Sherlock

Reputation: 11

Cannot change attributes of configuration ':app:debugCompile' after it has been resolved

A problem occurred configuring project ':app'.

Cannot change attributes of configuration ':app:debugCompile' after it has been resolved

When I update AndroidStudio to 3.3 and use 'com.android.tools.build:gradle:3.3.0'、org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.0+

As I known it works well when I remove

{ apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'},

But how resolve this problem when my projects have to use kotlin?

ext.kotlin_version = '1.3.11'
classpath 'com.android.tools.build:gradle:3.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

Upvotes: 1

Views: 2058

Answers (1)

Bhola Bhala
Bhola Bhala

Reputation: 199

In my project if i add kotlin after com.google.cloud.tools.endpoints-framework-client i have the same problem:

apply plugin: 'com.google.cloud.tools.endpoints-framework-client'
apply plugin: 'kotlin-android'

try to move your apply plugin: 'kotlin-android' the most to the top.

Good luck!

Upvotes: 1

Related Questions