[Solved] Resource compilation failed (Failed to compile values resource file…

Resource compilation failed (Failed to compile values resource file /home/fanbin/AndroidStudioProjects/BookTest/app/build/intermediates/incremental/debug/mergeDebugResources/merged.dir/values/values.xml. ]


Resource registered by this uri is not recognized (Settings | Languages & Frameworks | Schemas and DTDs)

Reason: In color.xml, the color resource does not contain “#”, i.e. #FF000000, which causes this compilation error!

as shown in the figure below, the # number is not added to line 6.

Note: there are other situations that may cause this error. 

Read More: