r.android r unresolved.. i looked but I may be blind...


Last Updated: 2010-10-22 19:53:15
  1. ThaKidd04

    ThaKidd04 Member

    im just trying to write a basic app that will flash the screen or something stupid when i hit a button but im getting nowhere mainly because when i try:

    Button okBtn = (Button) findViewById(R.android.okBtn);

    i get some message telling me that r cannot be resolved... i dont know what to do im trying to go by online tutorials and the android documentation am i missing something?

    Advertisement
  2. Stinky Stinky

    Stinky Stinky Well-Known Member

    Hey again Thakidd04 dude!

    Don't worry! I had a shower and i am no longer stinky now! hahhaa lol :D

    I am a first year IT student! So you can worry extra now cause i most probably will give you the wrong instructions! :D hahahaa

    Have you done the hello world app yet by any chance buddy? ;)

    As long as you aren't a rapist U will fit in well here on the forums! :)
  3. ThaKidd04

    ThaKidd04 Member

    im kinda doing my own version of hello world (since hello world is already written when u make new project) i wanted to do something like flash the screen or make the text change to hello android from hello world but i cant even get to using an event listener because instantiating the damn button wont work >:| lol im wondering if maybe my sdk didnt install correctly
  4. ThaKidd04

    ThaKidd04 Member

    droidfail.jpg [2010-10-22 13:53:06 - main.xml] Unable to resolve id "@layout/@+okBtn" for attribute "id"
    [2010-10-22 13:53:18 - main.xml] Unable to resolve id "@layout/@+okBtn" for attribute "id"
    [2010-10-22 15:00:47 - helloButton] ERROR: Unable to open class file C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\Java\Android\Test\helloButton\gen\com\helloBtn\R.java: No such file or directory

    why would i get a message like this in the console when i open a new project?
  5. ThaKidd04

    ThaKidd04 Member

    HAHA FIXED! ok apparently eclipse was trying to use the wrong instance of r. after scrolling down a bit i fixed the issue thanx stinky for trying to help tho.
  6. Stinky Stinky

    Stinky Stinky Well-Known Member

    YES!!

    Well done dude! ;)

    Glad you came out on top :)

    Stinks

Share This Page