Error:(16, 0) Gradle DSL method not found: 'runProguard()'

Exception:
 
 
<pre name="code" class="java">Error:(16, 0) Gradle DSL method not found: 'runProguard()'
Possible causes:The project 'RetrofitExample-master' may be using a version of Gradle that does not contain the method.
Gradle settings.The build file may be missing a Gradle plugin.
Apply Gradle plugin
 
 
Reason:
<pre name="code" class="java">If you are using version 0.14.0 or higher of the gradle plugin, you should replace "runProguard" with "minifyEnabled" in your build.gradle files.

runProguard was renamed to minifyEnabled in version 0.14.0. For more info, See Android Build System<a target=_blank href="http://tools.android.com/tech-docs/new-build-system">点击打开链接</a>
 
 
Solution:
<p style="margin-top: 0px; margin-bottom: 1em; padding-top: 0px; padding-bottom: 0px; border: 0px; font-size: 14px; vertical-align: baseline; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; line-height: 17.8048000335693px; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">Using '<code style="margin: 0px; padding: 1px 5px; border: 0px; vertical-align: baseline; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; white-space: pre-wrap; background: rgb(238, 238, 238);">minifyEnabled</code>' instead of '<code style="margin: 0px; padding: 1px 5px; border: 0px; vertical-align: baseline; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; white-space: pre-wrap; background: rgb(238, 238, 238);">runProguard</code>' works properly.</p><p style="margin-top: 0px; margin-bottom: 1em; padding-top: 0px; padding-bottom: 0px; border: 0px; font-size: 14px; vertical-align: baseline; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; line-height: 17.8048000335693px; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;"><span style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; background: transparent;"><code style="margin: 0px; padding: 1px 5px; border: 0px; vertical-align: baseline; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; white-space: pre-wrap; background: rgb(238, 238, 238);">Previous code :</code></span></p><pre name="code" class="java">buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
Current code :
 
 
<span style="font-family:Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;"><span style="font-size: 14px; line-height: 17.8048000335693px; white-space: pre-wrap;">
</span></span>
<span style="font-family:Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;"><span style="font-size: 14px; line-height: 17.8048000335693px; white-space: pre-wrap;"></span></span><pre name="code" class="java">buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }



 
 

 
 
 

你可能感兴趣的:(exception,android,android,gradle,AS,Studio)