Gradle DSL method not found: 'runProguard()'
2016-03-10 14:12
344 查看
Error:(16, 0) Gradle DSL method not found: 'runProguard()'
Possible causes:<ul><li>The project 'Android_FAB' may be using a version of the Android Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0).
<a href="fixGradleElements">Fix plugin version and sync project</a></li><li>The project 'Android_FAB' may be using a version of Gradle that does not contain the method.
<a href="openGradleSettings">Gradle settings</a></li><li>The build file may be missing a Gradle plugin.
<a href="apply.gradle.plugin">Apply Gradle plugin</a></li>
报这个错的原因其实是因为你在升级完后,然后工程会默认把你的gradle版本替换成最新的版本,所以你的build.gradle文件中的dependencies也变成最新的了,如下:
新版本可能没有做到向下兼容旧版本,其实看报错:runProguard()找不着了。以前也有出现过0.12到0.14后 "useOldManifestMerger“找不到的问题,解决方法:
Possible causes:<ul><li>The project 'Android_FAB' may be using a version of the Android Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0).
<a href="fixGradleElements">Fix plugin version and sync project</a></li><li>The project 'Android_FAB' may be using a version of Gradle that does not contain the method.
<a href="openGradleSettings">Gradle settings</a></li><li>The build file may be missing a Gradle plugin.
<a href="apply.gradle.plugin">Apply Gradle plugin</a></li>
报这个错的原因其实是因为你在升级完后,然后工程会默认把你的gradle版本替换成最新的版本,所以你的build.gradle文件中的dependencies也变成最新的了,如下:
dependencies { classpath 'com.android.tools.build:gradle:1.3.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files }
新版本可能没有做到向下兼容旧版本,其实看报错:runProguard()找不着了。以前也有出现过0.12到0.14后 "useOldManifestMerger“找不到的问题,解决方法:
buildTypes { release { runProguard false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } }
把代码中的 runProguard false 替换成 minifyEnabled false
相关文章推荐
- 引用折叠和完美转发
- 编写java程序推荐一个好的定义log的方式——lombok
- RHEL6.8Alpha quota BUG
- nginx服务器设置url的优雅链接
- 使用NSURLSessionDataTask请求数据(get post方式)
- js setTimeout
- Bean named '*' must be of type [*], but was actually of type [*] with root case
- 构造函数成员初始值列表(member initialization list)
- CSS padding 属性
- 安卓之HTTPSMD5加密
- 感恩
- 使用Alcatraz来管理Xcode插件
- 二维码条形码扫描
- 从Postgres95到PostgreSQL9.5:新版亮眼特性
- webview加载html代码,其中代码中有图片
- UIImage部分拉伸——stretchableImageWithLeftCapWidth的使用
- Java开发岗位面试题归类汇总
- 如何在Oracle Linux环境上安装yum
- hihocoder1269 优化延迟(二分&优先队列)
- Android Application Architecture