why from my eclipse R file is deleted?
Gen folder is in project explorer but R file is not there. it showing error on the (R.layou.main).
package org.example.Wardrobe;
import android.app.Activity;
import android.os.Bundle;
public class Start extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceSt开发者_如何学Pythonate);
setContentView(R.layout.main);
}
}
Just do a clean from Project->Clean and then Build the project again. That should get the R class generated again and your errors should disappear.
There will be some error in one of your xml file. fix that error, save your project and rebuild. R. java will be created.
Generally when Eclipse doesn't generate the R.java
file is when there is a problem occuring somewhere. Do you really have a main.xml
layout? If you are sure that everything is fine, do a Project -> Clean
and everything should be fine.
try one more time create one more project then check R.java exist or not.if not then there is some problem in installation process.i installed and R.java file exist in it.
精彩评论