android studio R file not found

   I was participating in a competition recently, and the competition required the development of an Android project. Let's just develop. The code written two days ago is good and runs very prefect. When I add new content today, I suddenly report an error that the R file cannot be found...


   How can this be? The newly added content is also correct. And the R file can also be found before. Looking at stackoverflow, the great god said to clear the cache, the jdk version, the package conflict, the version incompatibility... everything is said, and it makes sense, but I can run it before. is ok...).
   Later, I looked for the error message and finally found the clue. I


   wonder if the friends have found the error? That's right, I accidentally wrote the file name wrong... XML file names cannot use keywords, so this is mainly because of the return.xml file name. After the modification, everything is normal... I would like to remind my friends, whether you are an old driver or a novice, you must pay attention to the most basic requirements and develop good habits. In addition, after all, Android studio is relatively young, and it is normal to have many problems. Friends should be patient to debug, and I hope you can become an Android god.


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326335996&siteId=291194637