cannot resolve symbol 'R'

0 Bob Miner · October 20, 2015
I had things running fine having built from the SQLite vids.  WHen I tried to add a second Intent the MainActivity's use of "R" started this error. 

I'm just too green to figure this out, li'l help?

protected void onCreate(Bundle savedInstanceState) {
dbInput = (EditText) findViewById(;
dbText = (TextView) findViewById(;
dbHandler = new MyDbHandler(this,null,null,1);

 from below :
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
Error:Execution failed for task ':app:processDebugResources'.
> org.gradle.process.internal.ExecException: Process 'command 'E:\AndroidSDK\build-tools\22.0.1\aapt.exe'' finished with non-zero exit value 1
Information:BUILD FAILED

Post a Reply


Oldest  Newest  Rating
0 Gary Whitney · October 22, 2015
I just did it myself. Here is how.
I noticed I misspelled an Activity,
So I refactor /renamed  the java and the layout.
Then I changed the tile string. BINGO R turned red and my code had errors.

You see when the Activity is created the Manifest is created, and it has the string reference for the title in it.
So when I tried to clean it or rebuild it. The error persists.

Manually changing the manifest is discouraged and sometimes it resists the changes.
I had to backspace the old reference and paste in the one is my string file.

I found my problem by carefully reading the error message in the build.

I how this sheds some light on your  problem.
0 Gary Whitney · October 22, 2015
I am not sure what you mean by a second Intent.
I checked my code and it didn't use intents.

Sometime the R reference can turn red indicating that A.S. is having trouble working with it (even though it creates R).
When this happens to me I Run  Build > Clean Project.

You are not too green if you are trying to use SQLite.
  • 1

Java / Android Development


Very popular language used to create desktop applications, website applets, and Android apps.

Bucky Roberts Administrator