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

    }
}

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

目录
相关文章
|
2月前
Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed with multiple
Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed with multiple
18 1
|
2月前
|
缓存 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
15 1
|
2月前
Error:Execution failed for task ':app:javaPreCompileDebug'. > Annotation processors must be explicit
Error:Execution failed for task ':app:javaPreCompileDebug'. > Annotation processors must be explicit
74 0
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(完美解决)
323 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
108 0
|
Android开发 Go
Gradle sync failed: The first result from the daemon was empty. Most likely the process died immediately after connection
Gradle sync failed: The first result from the daemon was empty. Most likely the process died immediately after connection solv...
2926 0