Reputation: 3069
I have Android Studio 0.8.9. Until now, It could sync with gradle files successfully, But today when I opened it, It gives me this error:
UnsupportedMethodException
Failed to set up Android modules in project 'Project': Unsupported method: SourceProvider.getJniDirectories().
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.
Can you help me solve this? Thanks.
Upvotes: 27
Views: 13051
Reputation: 3277
As stated by Justin, Upgrading to Android Studio 0.9.0 fixes this issue.
Upvotes: 29
Reputation: 1710
To correct this issue I down-graded the android-plugin in your projects top level build.gradle file from classpath 'com.android.tools.build:gradle:0.14.+' to classpath 'com.android.tools.build:gradle:0.13.+'
So right now the buildscript method in my projects build.grade looks like
buildscript {
repositories {
mavenCentral()
}
dependencies {
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.android.tools.build:gradle:0.13.+'
}
}
I think there may be a bug with version .14, I sent my error report.
Upvotes: 15