问题描述
- Android studio 混淆打包报错了
-
先运行gradlew clean,没有问题。
再运行gradlew assembleRelease 就报了下面的错:Warning: D:deveAdrichAndroidManifest.xml:23:5 Warning:
application@android:icon was tagged at AndroidManifest.xml:23 to replace other declarations but no other declaration present
Warning: D:deveAdrichAndroidManifest.xml:23:5 Warning:
application@android:theme was tagged at AndroidManifest.xml:23 to replace other declarations but no other declaration present
D:deveAdrichAndroidManifest.xml:23:5 Warning:
application@android:icon was tagged at AndroidManifest.xml:23 to replace other declarations but no other declaration present
D:deveAdrichAndroidManifest.xml:23:5 Warning:
application@android:theme was tagged at AndroidManifest.xml:23 to replace other declarations but no other declaration present
:Adrich:processReleaseResources
D:deveAdrichuildintermediates
es
eleaselayout
echarge1_activity.xml:100: error: Error: No resource found that matches the given name (at 'background' with value '@color/white').
D:deveAdrichuildintermediates
es
eleaselayout
echarge2_activity.xml:52: error: Error: No resource found that matches the given name (at 'background' with value '@color/white').
D:deveAdrichuildintermediates
es
eleaselayout
echarge2_activity.xml:74: error: Error: No resource found that matches the given name (at 'background' with value '@color/white').
:Adrich:processReleaseResources FAILEDFAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':Adrich:processReleaseResources'.com.android.ide.common.internal.LoggedErrorException: Failed to run command:
D:androidadt-bundle-windows-x86_64-20140702sdkuild-toolsandroid-4.4Waapt.exe package -f --no-crunch -I D:androidadt-bundle-windows-x86_64-20140702sdkplatformsandroid-19android.jar -M D:deveAdrichuildintermediatesmanifestsfull
eleaseAndroidManifest.xml -S D:deveAdrichuildintermediates
es
elease -A D:deveAdrichuildintermediatesassets
elease -m -J D:deveAdrichuildgeneratedsourceelease -F D:deveAdrichuildintermediates
es
esources-release.ap_ -G D:deveAdrichuildintermediatesproguard-rules
eleaseaapt_rules.txt --custom-package com.adrich.adrich -0 apk --output-text-symbols D:deveAdrichuildintermediatessymbols
elease
Error Code:
1
Output:
D:deveAdrichuildintermediates
es
eleaselayout
echarge1_activity.xml:100: error: Error: No resource found that matches the given name (at 'background' with value '@color/white').
D:deveAdrichuildintermediates
es
eleaselayout
echarge2_activity.xml:52: error: Error: No resource found that matches the given name (at 'background' with value '@color/white').
D:deveAdrichuildintermediates
es
eleaselayout
echarge2_activity.xml:74: error: Error: No resource found that matches the given name (at 'background' with value '@color/white'). - 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: 2 mins 3.648 secs
- What went wrong:
解决方案
Android Studio 混淆打包
使用Android Studio混淆打包(ProGuard基础语法和打包配置)
Android Studio中使用Gradle打包