The R. java file is automatically generated. However, when you write an error to an xml file, R. java does not automatically generate the corresponding value. At this time, we will get used to clean this project. At this time, we will suddenly find that R. java is gone.
At this time, you must be very angry. You may try your best to find answers online. There will be many answers on the Internet to tell you right-click the project --> Android Tools --> fix project properties. Maybe you cannot fix R. java. At this time, you need to consider whether some xml is wrong. As long as there is a problem with the xml file, the system will never automatically generate this R. java file, because it will refer to the data in each xml file to generate R. java.
So after you clear the project, the error changes and becomes a blank package. The error is also an error in the src package. If you encounter such an error and dozens of xml files in the project, it must be depressing or even crashing.
But it does not matter. When you clean the project again, the console will print an error message:
Example: [18:14:19-myweibo o] F: \ android_workplace \ myweibo \ res \ layout \ home_list.xml: 6: error: Error: no resource found that matches the given name (at 'src' with value' @ drawable/usericon ').