2014-10-31 33 views
27

我有Android Studio 0.8.9。 到现在为止,这可能与gradle这个文件同步成功, 但是今天,当我打开它,它给了我这个错误:UnsupportedMethodException Android Studio 0.8.9

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. 

你能帮我解决这个问题?谢谢。

+0

你有什么版本的Gradle?根据发布说明,您需要更新至0.14.0 - http://tools.android.com/recent/androidstudio090released – michaelcarrano 2014-10-31 18:33:16

+0

0.14.0是Android Studio的版本,不是gradle吧? – 2014-11-03 04:48:15

+0

我有同样的问题。 Android Studio最新,我的sdk工具也更新到v21.0.3 – 2014-11-03 17:11:28

回答

15

要解决这个问题,我在你的项目从 类路径“com.android.tools.build:gradle:0.14.+” 到 类路径“COM向下分级的Android的插件顶级的build.gradle文件。 android.tools.build:gradle:0.13.+”

所以,现在在我的项目的buildscript方法build.grade看起来像

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.+' 
    } 
} 

我觉得有可能是0.14版中的错误,我发送了我的错误报告。

+0

还要确保你有最新的构建工具,平台工具,android存储库,谷歌存储库已安装。如果使用SDK管理器中的所有GMS服务。 – Danuofr 2014-11-01 19:48:21

+0

你能链接到你打开的问题吗? – 2014-11-03 04:49:13

+0

错误报告在哪里? – Phil 2014-11-03 16:10:13

30

Justin所述,升级到Android Studio 0.9.0可修复此问题。

相关问题