android - Hello World, most basic of setup errors -


all trying setup simple android "hello world" example, have made no alteration java code or xml layout (none xml @ in fact) beyond has been prescribed through searching stackoverflow remedy problems experiencing: scr folder errors, "r cannot resolved variable."

i have followed advice import mypackage.r rather android.r , clean project, rebuild it, restart eclipse after clean, , related can find... when follow advice clean project eclipse erases "import local.example.project1.r" , resets "android.r" or removes import...

i'm throwing errors in simplest example of "hello world," should go right out of box , cannot find resonable explanation why...

what missing?

if helps figure out problem notice gen folder not contain anything, though indications should contain autogenerated java file....

package local.example.project1;   import local.example.project1.r; import android.app.activity; import android.os.bundle; import android.view.menu;    public class mainactivity extends activity {      @override protected void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         setcontentview(r.layout.activity_main);     }      @override     public boolean oncreateoptionsmenu(menu menu) {         // inflate menu; adds items action bar if present.         getmenuinflater().inflate(r.menu.main, menu);         return true;     }  } 

if there nothing in gen folder, you'd better clean project , build again, or restart eclipse. check adt version whether out of date. can download latest sdk bundle verify project.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -