SourceProvider.getJniDirectories
16lz
2021-01-25
今天android studio跑项目,build了一下,始终跑不起,把gradle和android studio都更新了一下,还是不行,
一直报这个错误
UnsupportedMethodExceptionFailedtosetupAndroidmodulesinproject'Project':Unsupportedmethod:SourceProvider.getJniDirectories().TheversionofGradleyouconnecttodoesnotsupportthatmethod.Toresolvetheproblemyoucanchange/upgradethetargetversionofGradleyouconnectto.Alternatively,youcanignorethisexceptionandreadotherinformationfromthemodel.
这时候搜了下,才知道是build.gradle里面的问题:
buildscript{repositories{jcenter()}dependencies{classpath'com.android.tools.build:gradle:0.14.0'//NOTE:Donotplaceyourapplicationdependencieshere;theybelong//intheindividualmodulebuild.gradlefiles}}
其中的这句是个bug
classpath'com.android.tools.build:gradle:0.14.0'
改成
classpath'com.android.tools.build:gradle:0.13.+'
就OK了
参考fly to stackoverflow
更多相关文章
- 没有一行代码,「2020 新冠肺炎记忆」这个项目却登上了 GitHub 中
- 不吹不黑!GitHub 上帮助人们学习编码的 12 个资源,错过血亏...
- Android(安卓)Studio的几个Error与解决方案:“NDK not configure
- android AlertDialog或toast显示错误 Unable to add window toke
- 使用HTTPclient访问豆瓣API问题
- Android(安卓)Program type already present: XXXX
- Ubuntu中 android 安装(JDK+ECLIPSE+ANDROID)
- Android项目打包遇com.android.builder.internal.aapt.v2.Aapt2E