1. Download our Official Android App: Forums for Android!

Support R.id messed up during designing the app

Discussion in 'Android Help' started by Neo Sluf, Dec 31, 2014.

  1. Neo Sluf

    Neo Sluf Lurker
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    2
    Joined:
    Dec 31, 2014

    Dec 31, 2014
    2
    0
    15
    One day I designed an idea about an app. I decided to make it and focus first on designing and after that coding.

    So I created my project and start working with the designs. Start adding buttons, textviews, etc. Changing their id buttons etc. (I decided to work with the drag n' drop way and not on the codes).

    I am done!.. I am ready now to code. Then i type mybutton = Button findViewById (R.id.menubutton) then an error appears (R.id.menubutton does not exist!) what the f@$$@! I go back to my layouts and look on my menu button and its id is id@menubutton!.... what the hell happened?.. I change the name but problems got worst. Not all the id in the layout doesn't exist. I am messed up with the R.id.

    I rebuilt my project and copy paste the code and creating new layouts. And after finishing (BOOM AGAIN). And this is really frustrating and decided to open the R.id.java and messes it up. But still nothing happens.

    Because my enthusiasm is still there I REBUILT AGAIN MY APP. Now this time I decided not to focus on heavy designing. With less buttons, everything. I finally finished my app. Phew!....

    After a week inactivity I decided to continue again on my app by adding more designs and this problem threatens me again.

    MY QUESTION

    1.) Are the ids you put in the button got messed up? (Throwing some unusual errors like not existing when you code it. Or let say it ids that are not registered at R.id)

    2.) I am thinking that maybe this problem occurs when you use the drag n' drop style of designing your app most of the time. Can this be a cause?

    Btw, in order to prove myself this is a bug i tried to reproduce it. And the way to produce that bug (mess up with the R.id) Is use the drag n' drop designing a lot. Well as you can see when you add a button, it instantly put the default id and just rename it. And renaming the id causes the problem. The problem is when I rename one id of a button it messed up everything that id you made on your buttons won't show up when you add it with your code.

    SORRY IF MY QUESTION IS VERY CONFUSING BECAUSE I AM ALSO CONFUSED ON WHAT HAPPENING ON THIS ONE. PLEASE I NEED HELP....
     

    Advertisement

Share This Page

Loading...