This problem is believed that many people have found many solutions from the Internet,
Android can't generate R files is a painful thing, even if there is no error in your XML file, he can not build. For this issue, I summarize the reasons for the following aspects.
I. XML itself has errors
R.java This file is automatically generated, but if you accidentally write the XML file incorrectly, or accidentally in the editing of XML, click Run (in fact, this time will run the XML file, will generate an XML file with the same name, suffix xx.out.xml), and then happened to you swim clear the project, you can Can find gen under the R.java file is not, this at the beginning of the very irritating, really do not know how to solve, and later found that as long as the XML file has a problem, the system will never give you automatically generate this R.java file, because he will refer to each of your XML data to generate R.java, so nature will not generate The Although know the reason but the problem headache, if the project layout XML file has dozens of, this time how to do, do you want an XML to see, hehe, actually is not, the console of the information clear, and then clear the project, this time, The console will have a lot of red information, the reference to this will certainly be able to find exactly which file error.
The following is a mistake to run the XML file, you can see that Gen's package is not empty, the R.java file also exists, and the explicit expenditure is the layout of the error in the package
Two. Incorrect encoding format
Sometimes due to coding format problems, resulting in unable to generate r files, at this time, the encoding format into Utf-8 can
Three, for unknown reasons, may be a configuration problem (an escape character issue).
It is true that most of our mistakes are due to some errors in our XML files, especially those we have downloaded from GitHub, and if we are unable to use them, we need to copy the project manually. Will forget to modify your own folder in the Mainfest.xml file.
<?xml version= "1.0" encoding= "Utf-8"?>
<manifest xmlns:android= "Http://schemas.android.com/apk/res/android"
Package= "Com.tjerkw.slideexpandable.library"
Android:versioncode= "1"
Android:versionname= "1.0" >
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Android Eclipse Project R file could not be generated