Justcurious
Justcurious

Reputation: 2299

Layout related error and query with xml file

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

Upvotes: 0

Views: 68

Answers (2)

Justcurious
Justcurious

Reputation: 2299

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.

Upvotes: 0

Hardik Joshi
Hardik Joshi

Reputation: 9507

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.

Upvotes: 2

Related Questions