標籤:android http io ar os java for sp div
今天android studio跑項目,build了一下,始終跑不起,把gradle和android studio都更新了一下,還是不行,
一直報這個錯誤
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.
這時候搜了下,才知道是build.gradle裡面的問題:
buildscript { repositories { jcenter() } dependencies { classpath ‘com.android.tools.build:gradle:0.14.0‘ // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files }}
其中的這句是個bug
classpath ‘com.android.tools.build:gradle:0.14.0‘
改成
classpath ‘com.android.tools.build:gradle:0.13.+‘
就OK了
參考 fly to stackoverflow
關於android studio Gradle報錯