Error:(1, 0) The android gradle plugin version 3.0.0-alpha1 is too old, please update to the latest
16lz
2021-01-24
从GitHub上down的一个项目,导入自己的Android studio (3.0)显示报错:
Error:(1, 0) The android gradle plugin version 3.0.0-alpha1 is too old, please update to the latest version.
To override this check from the command line please set the ANDROID_DAILY_OVERRIDE environment variable to
"85d245b6eb7e679c808bbbe7f412b0905b7e5b6a"
Upgrade plugin to version 3.0.0-alpha1 and sync project
href="openFile:C:/Users/mipwwpoint/Desktop/TestZxing/TestZxing/build.gradle">Open File
插件的版本过时了,因为alpha1的使用期限只有40天,相当于就是个过渡测试版本。
解决办法:
项目最外层的build.gradle 中:
buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.3.2' //改下gradle的版本号,从github上down下来时是4.0,我改成了2.3.2版本// NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files }}
改完之后 studio 会联网下载好多东西(我的是这样....)
不改这里的话通过图形界面修改也一样:
点击出现:
down下来默认是gradle version 是4.0 ,plugin version 是3.0.0-alpha1。我修改成如图所示。
附带gradle version 与plugin version之间的版本关系:
更多相关文章
- android openssl 编译+demo
- Android小项目之 where are you 监控
- Xamarin Android(安卓)所见即所得问题
- Android不同版本的新特性
- RxJava RxAndroid(安卓)资源收录
- System.out.println()和Log耗时之比
- Android(安卓)项目导入后真机运行提示:W/dalvikvm(10375): VFY 错
- Android(安卓)SDK版本号和名称对应表
- Google code android开源项目(一)