Issue
I just had a working app turn into a broken one. When I call any findViewById
, the app cannot browse R properly and says R cannot be resovled to variable. So none of my drawables and code can be read. It says to import R but then it gets even further into the rabbit hole of fustration.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
edit: I had an error within my strings.xml. IT now works. Thanks to the helpful comments.
Solution
Most probable cause is an error in one of your layouts. If the resource compiler can't compile the resources, it doesn't generate the file defining R, so suddenly R becomes unresolvable.
Look through your layouts for something wrong. It will probably be the change you made just before it all went wrong.
Answered By - C B J
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.