• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

Why MainActivity.java showing error?

 
Greenhorn
Posts: 22
Netbeans IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've designed the front-end and opened the MainActivity.java.
When I hover my mouse over the error, It says "cannot resolve symbol R"

Please help me to rectify this issue!
 
Rancher
Posts: 4936
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

"cannot resolve symbol R"  


The R class is generated by the IDE after all the bits and pieces of the project have been checked.  Most often there is an error in an xml file that is sort of hidden and requires you to look in all the folders with xml files (eg res) to see if any of them are flagged as having errors.
 
Nora Morris
Greenhorn
Posts: 22
Netbeans IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys, I solved the issue
Go to File -> Invalidate Caches / Restart... -> Invalidate and Restart.
It worked for me!
 
Ranch Hand
Posts: 570
3
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sometimes this happened because of the package name  named wrongly
 // named wrongly
 
Nora Morris
Greenhorn
Posts: 22
Netbeans IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

John Joe wrote:Sometimes this happened because of the package name  named wrongly
 // named wrongly


Okay I got it! Thanks for helping me
 
Did you miss me? Did you miss this tiny ad?
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic