Error:Execution failed for task ':transformClassesAndResourcesWithProguardForRelease'

简介: Error:Execution failed for task ':transformClassesAndResourcesWithProguardForRelease'

Error:Execution failed for task ':transformClassesAndResourcesWithProguardForRelease'. > Job failed,


这样解决:


在混淆文件:proguard.cfg中添加:-ignorewarnings -keep class * { public private *; }

\

OK

     在后期又遇到不同的问题,这时候我们必须重视报错时的警告,仔细的阅读警告我们能发现其中的错误,保持混淆和去掉混淆是很重要的,混淆的主要作用就是保证你的app被反编译后代码的阅读性变得很差,相当于又一次加固你的代码。

\


代码主要作用:

buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        signingConfig signingConfigs.config
        debuggable false
        shrinkResources true

    }
}

其中这里代表是否开启混淆。

相关文章
|
10月前
Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed with multiple
Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed with multiple
|
9月前
|
JSON 数据格式
【ERROR】Error: transaction invalidated with status (ENDORSEMENT_POLICY_FAILURE)
【ERROR】Error: transaction invalidated with status (ENDORSEMENT_POLICY_FAILURE)
70 0
|
10月前
|
Java
failed to solve with frontend dockerfile.v0: failed to create LLB definition: unexpected status code
failed to solve with frontend dockerfile.v0: failed to create LLB definition: unexpected status code
177 0
|
10月前
|
缓存 Java 开发工具
Error:Execution failed for task ‘:app:preDebugAndroidTestBuild’. Conflict with dependency ‘com.andr
Error:Execution failed for task ‘:app:preDebugAndroidTestBuild’. Conflict with dependency ‘com.andr
|
10月前
|
Java 数据库 索引
GreenDao,clearIdentityScope报错Error:Execution failed for task ':app:compileDebugJavaWithJavac'. > Com
GreenDao,clearIdentityScope报错Error:Execution failed for task ':app:compileDebugJavaWithJavac'. > Com
|
10月前
Error:Execution failed for task ':app:javaPreCompileDebug'. > Annotation processors must be explicit
Error:Execution failed for task ':app:javaPreCompileDebug'. > Annotation processors must be explicit
Elasticsearch exception [type=search_phase_execution_exception, reason=all shards failed]
Elasticsearch exception [type=search_phase_execution_exception, reason=all shards failed]
Elasticsearch exception [type=search_phase_execution_exception, reason=all shards failed]
Error:svn:E155037:Previous operation has not finished; run ‘cleanup‘ if it was interrupted(完美解决)
Error:svn:E155037:Previous operation has not finished; run ‘cleanup‘ if it was interrupted(完美解决)
472 0
Error:svn:E155037:Previous operation has not finished; run ‘cleanup‘ if it was interrupted(完美解决)
Execution failed for task :Test:lintVitalRelease/Lint found fatal errors while assembling a release
Execution failed for task :Test:lintVitalRelease/Lint found fatal errors while assembling a release
132 0