0

Unable to resolve R.layout.main error. what is the reason for this error?

Description

Resource Path Location Type activity_yamba cannot be resolved or is not a field Yamba.java  /Yamba_Project/src/com/abhishek/yamba_project   line 33 Java Problem
Zombie
  • 1,965
  • 2
  • 20
  • 34
Justcurious
  • 2,201
  • 1
  • 21
  • 36

2 Answers2

2

You sure R.layout.main is there in your project? OR in import statement You import import com.example.myapp.R; ? if android.R.* is there then remove it and replace it with your R.java import statement.

Also refer This.

Community
  • 1
  • 1
Hardik Joshi
  • 9,477
  • 12
  • 61
  • 113
0

The reason for the above error is due to xml file which are not build properly and the variable declared didn't resolve R.Java file.

So if this error occours one should check res folder for error in xml files.

Justcurious
  • 2,201
  • 1
  • 21
  • 36