Reputation: 9065
Really newbie to Android project, but just want to run a demo project from here
After import to the new Gradle style, found that some code like builder.setIcon(R.drawable.ic_dialog_alert);
R
can't find the dependency,
And I checked other project's which R
is happy, but did not find any dependency imported explicitly.
And the magic Alt+Enter
is not working this time either :-(
This may be a silly question, but please give some guidance.
Upvotes: 0
Views: 59
Reputation: 1474
Try the following steps:-
1) Check if you have imported 'R' or not, if not import it by clicking "Alt+Enter" in windows/linux.
2) Clean & rebuild your project and then try to run it.
I think this will definitely solve your problem.
Upvotes: 0
Reputation: 3422
Clean and Rebuild your Project.
It will rebuild your R file for your specific project and don't import R from Any other package only import from "'your.package.name'.R".
Upvotes: 1
Reputation: 566
Check Which R file you have imported in this class , you should import R file of your package.
Upvotes: 1