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

Viewed 5901

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?

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.
Related