先运行gradlew clean,没有问题。
再运行gradlew assembleRelease 就报了下面的错:
Warning: D:\deve\Adrich\AndroidManifest.xml:23:5 Warning:
application@android:icon was tagged at AndroidManifest.xml:23 to replace other declarations but no other declaration present
Warning: D:\deve\Adrich\AndroidManifest.xml:23:5 Warning:
application@android:theme was tagged at AndroidManifest.xml:23 to replace other declarations but no other declaration present
D:\deve\Adrich\AndroidManifest.xml:23:5 Warning:
application@android:icon was tagged at AndroidManifest.xml:23 to replace other declarations but no other declaration present
D:\deve\Adrich\AndroidManifest.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:\deve\Adrich\build\intermediates\res\release\layout\recharge1_activity.xml:100: error: Error: No resource found that matches the given name (at 'background' with value '@color/white').
D:\deve\Adrich\build\intermediates\res\release\layout\recharge2_activity.xml:52: error: Error: No resource found that matches the given name (at 'background' with value '@color/white').
D:\deve\Adrich\build\intermediates\res\release\layout\recharge2_activity.xml:74: error: Error: No resource found that matches the given name (at 'background' with value '@color/white').
:Adrich:processReleaseResources FAILED
FAILURE: 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:\android\adt-bundle-windows-x86_64-20140702\sdk\build-tools\android-4.4W\aapt.exe package -f --no-crunch -I D:\android\adt-bundle-windows-x86_64-20140702\sdk\platforms\android-19\android.jar -M D:\deve\Adrich\build\intermediates\manifests\full\release\AndroidManifest.xml -S D:\deve\Adrich\build\intermediates\res\release -A D:\deve\Adrich\build\intermediates\assets\release -m -J D:\deve\Adrich\build\generated\source\r\release -F D:\deve\Adrich\build\intermediates\res\resources-release.ap_ -G D:\deve\Adrich\build\intermediates\proguard-rules\release\aapt_rules.txt --custom-package com.adrich.adrich -0 apk --output-text-symbols D:\deve\Adrich\build\intermediates\symbols\release
Error Code:
1
Output:
D:\deve\Adrich\build\intermediates\res\release\layout\recharge1_activity.xml:100: error: Error: No resource found that matches the given name (at 'background' with value '@color/white').
D:\deve\Adrich\build\intermediates\res\release\layout\recharge2_activity.xml:52: error: Error: No resource found that matches the given name (at 'background' with value '@color/white').
D:\deve\Adrich\build\intermediates\res\release\layout\recharge2_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