Android resource linking failed

编译报错:

Android resource linking failed
Output:  C:\Users\13579\Desktop\early\MyLoading\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:3082: 
error: expected reference but got (raw string) #00000000.
error: failed linking references.

Command: C:\Users\13579\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.0-4818971-windows.jar\d7e688e38fe8878f08b5bcf541788205\aapt2-3.2.0-4818971-windows\aapt2.exe link -I\
        E:\sdk\platforms\android-28\android.jar\
        --manifest\
        C:\Users\13579\Desktop\early\MyLoading\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
        -o\
        C:\Users\13579\Desktop\early\MyLoading\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
        -R\
        @C:\Users\13579\Desktop\early\MyLoading\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
        --auto-add-overlay\
        --java\
        C:\Users\13579\Desktop\early\MyLoading\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
        --custom-package\
        com.xq.e.myloading\
        -0\
        apk\
        --output-text-symbols\
        C:\Users\13579\Desktop\early\MyLoading\app\build\intermediates\symbols\debug\R.txt\
        --no-version-vectors
Daemon:  AAPT2 aapt2-3.2.0-4818971-windows Daemon #0

在gradle.property中添加:

android.enableAapt2=false

继续报错:

The option 'android.enableAapt2' is deprecated and should not be used anymore.
Use 'android.enableAapt2=true' to remove this warning.
It will be removed at the end of 2018..

Process 'command 'E:\sdk\build-tools\28.0.2\aapt.exe'' finished with non-zero exit value 1

最后通过逐段注释发现:

 

在styles中不可直接使用颜色值,需要引用。

正确为:

 

你可能感兴趣的:(项目遇到问题)