Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio 3.0 Canary 4 unsupported method NativeArtifact.getRuntimeFiles()

My project runs well under android studio 2.3. But with 3.0, it failed to refresh with this Error:

Error:Unsupported method: NativeArtifact.getRuntimeFiles().
The version of Gradle you connect to does not support that method.
To resolve the problem you can change/upgrade the target version of Gradle you connect to.
Alternatively, you can ignore this exception and read other information from the model.

I'm using Gradle 2.14.1 & Gradle android plugin 2.2.0. Upgrade Gradle (to 3.5) does not solve the problem.

Does anybody else have this problem and was able to find any workaround?

like image 906
monkeyM Avatar asked Aug 01 '17 07:08

monkeyM


2 Answers

I had the same error message using 'com.android.tools.build:gradle:3.3.0'.

I found 2 ways for fixing this error :

  • Update Android Studio to version 3.3 (Help -> Check for Update...)
  • or switch to 'com.android.tools.build:gradle:3.2.1' in build.gradle.
like image 135
Pico12 Avatar answered Nov 03 '22 10:11

Pico12


Try to change in build.gradle

 dependencies {
    classpath 'com.android.tools.build:gradle:3.0.1'
}
like image 24
Alexander Dziadyk Avatar answered Nov 03 '22 10:11

Alexander Dziadyk