1

Here's the content of my resource file \res\values\colors.xml:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="themeGray">#ff8A9199</color>
    <color name="themeLightGray">#ffeaeaea</color>
    <color name="themeDarkGray">#ff3f434b</color>
    <color name="themeRed">#ffCC292B</color>
    <color name="themeBlue">#ff002E63</color>
    <color name="themeWhite">#ffffffff</color>
    <color name="buttonNormal">@color/themeGray</color>
    <color name="buttonPressed">@color/themeBlue</color>
</resources>

The two values

@color/themeGray
@color/themeBlue

are red colored Cannot resolve symbol '@color/themeGray'

EDIT

This what I see in the Message windows:

Error:Execution failed for task ':app:mergeDebugResources'.
> java.lang.NullPointerException (no error message)
Seraphim's
  • 12,559
  • 20
  • 88
  • 129

3 Answers3

0

After trying with project clean/compile and File>Invalidate Caches / Restart... with no success, I solved the problem relocating the project to another folder.

Seraphim's
  • 12,559
  • 20
  • 88
  • 129
0

Change

xmlns="http://schemas.android.com/tools"

to

xmlns="http://schemas.android.com/apk/res-auto"

lets see what happens

-3

That also depends on where your are trying to access the resource files. some fields only take rgb format for colors.

Hirak Chhatbar
  • 3,159
  • 1
  • 27
  • 36