Android Studio Could not find method runProguard() for arguments?

简介:

Android Studio Could not find method runProguard() for arguments?错误的解决办法


/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/bin/java "- com.intellij.rt.execution.application.AppMain org.gradle.launcher.GradleMain --build-file /Users/Tom/Documents/Git_open_sources/android-material-drawer-template/app/build.gradle

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/Tom/Documents/Git_open_sources/android-material-drawer-template/app/build.gradle' line: 16

* What went wrong:
A problem occurred evaluating project ':app'.
> Could not find method runProguard() for arguments [false] on BuildType_Decorated{name=release, debuggable=false, testCoverageEnabled=false, jniDebuggable=false, pseudoLocalesEnabled=false, renderscriptDebuggable=false, renderscriptOptimLevel=3, applicationIdSuffix=null, versionNameSuffix=null, minifyEnabled=false, zipAlignEnabled=true, signingConfig=null, embedMicroApp=true, mBuildConfigFields={}, mResValues={}, mProguardFiles=[], mConsumerProguardFiles=[], mManifestPlaceholders={}}.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 6.741 secs

Process finished with exit code 1
<span style="background-color: rgb(255, 255, 255);">
</span>
<span style="background-color: rgb(255, 255, 255);">
</span>
<span style="background-color: rgb(255, 255, 255);">
</span>
<span style="background-color: rgb(255, 255, 255);">
</span>
<span style="background-color: rgb(255, 255, 255);">
</span>
<span style="background-color: rgb(255, 255, 255);">
</span>
<span style="background-color: rgb(255, 255, 255);">
</span>
 
apply plugin: 'com.android.application'

android {
compileSdkVersion 21
buildToolsVersion "21.1.0"

defaultConfig {
    applicationId "com.poliveira.apps.materialtests"
    minSdkVersion 11
    targetSdkVersion 21
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        runProguard false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:21.0.0'
//noinspection GradleDependency
compile "com.android.support:appcompat-v7:21.0.0"
compile 'com.android.support:recyclerview-v7:21.0.0'
}    

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

Instead of "runProguard false" use 

"minifyEnabled false"代替"runProguard false"就可以了



相关文章
|
2天前
|
存储 Linux 开发工具
Linux手动升级替换Android Studio
【6月更文挑战第22天】
|
1天前
|
Android开发
Android Studio(2022.3.1)设置阿里云源-新旧版本
Android Studio(2022.3.1)设置阿里云源-新旧版本
8 1
|
5天前
|
XML Java 开发工具
Android Studio开发Android TV
【6月更文挑战第19天】
|
7天前
|
Android开发
Android studio 出现Plugin [id: ‘com.android.application‘, version: ‘8.1.0‘, apply: false] 问题解决办法
Android studio 出现Plugin [id: ‘com.android.application‘, version: ‘8.1.0‘, apply: false] 问题解决办法
75 1
|
4天前
|
Android开发
如何 将Android Studio升级至最新版(4.0)
如何 将Android Studio升级至最新版(4.0)
8 0
|
4天前
|
Java 开发工具 Android开发
Android Studio 导出JavaDoc文档
Android Studio 导出JavaDoc文档
9 0
|
7天前
|
开发工具 Android开发
Android studio历史版本下载
Android studio历史版本下载
26 0
|
Android开发
【错误记录】Android Studio 编译报错 ( Installed Build Tools revision 31.0.0 is corrupted )
【错误记录】Android Studio 编译报错 ( Installed Build Tools revision 31.0.0 is corrupted )
766 0
【错误记录】Android Studio 编译报错 ( Installed Build Tools revision 31.0.0 is corrupted )
|
数据可视化 开发工具 Android开发
【错误记录】Android Studio 向 GitHub 提交代码报错 ( Push failed: Failed with error: Could not read | 使用命令行提交代码 )
【错误记录】Android Studio 向 GitHub 提交代码报错 ( Push failed: Failed with error: Could not read | 使用命令行提交代码 )
252 0
【错误记录】Android Studio 向 GitHub 提交代码报错 ( Push failed: Failed with error: Could not read | 使用命令行提交代码 )
|
1月前
|
Android开发
android studio 重新将module中的代码加入到自己项目中,报错找不到SO文件。
android studio 重新将module中的代码加入到自己项目中,报错找不到SO文件。
13 1