Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (152)

Sign In or Sign Up now to post a comment!
  • THX FOR THE VID! plz subscribe to me! i m new to youtube and have posted 1 video but its a rly useful tutorial for getting free music on an iDevice! plz watch and rate and im sry im not trying to spam!

    THX!

  • hey i wasnt able to find the .java src file. I did all the step you made, should i just make a new class to replaces that file?

  • Hello.

    I'm a brazilian student... After 3 day search for tutorials and vids about Android Development i found your channel, your work is awesome, very simple, direct e cool... And the most important your diction is very good!

    Thanks a lot!

  • i reccomend watching thenewbostons java tutorials cause it is too difficult otherwise also google xml tutorials.

  • Yet another fix for the R.java: Look in the main.xml and take out any errors. The errors prevent the R.java from generating, which causes the error in the IDs.

  • ok here is how it works for R.id.bAdd error,.,

    1) DO NOT IMPORT 'R' (or mess with it like he said)

    2) IF YOU HAVE CREATED 'raw' AND 'layout-landscape' folders DELETE THEM (if it's showing errors)

    3) SAVE ALL and CLEAN (inside PROJECT)

    4)try code now,if it still not working

    5)CHECK WHETHER YOU HAVE 'R' where it shud belong (gen->ur project name);

    6)IN CASE ITS NOT THERE copy ur code to some text file and CREATE NEW PROJECT

    7)NOW IT WORKS ,.,

  • @ujwalvail I did all those things it still doesn't work, clean, somehow removed my R file

  • @lolfag93 clean removed my R as well at first but later it works fine,,this error is only because of missing R,,restore it somehow(best way is to create new project for new programmers) then start programming again by copying previous code

  • Still cannot solve this problem add=(Button) findViewById(R.id.bAdd);

    every time it shows that id cannot be resolved or not a field.

    plz anyone suggest be step by step what to do since i m very new in android.thnk u

  • I started watching these tutorials and have to say - they are very very clear and easy to follow. Brilliant work !

  • On My StartinPoint thingy the "setContentView(R.layout.main)­;" the "main" at the end isn't blue like it is in this video, does that mean it's not actually linked to the main.xml?

  • I facepalmed once he started explaining an integer. This aint beginner java!!!

  • add @+id/ to your id's EX. "@+id/MY_BUTTON"

  • remove

    android:text_size fields in buttons and save project to fix errors

  • To solve problem with main.XML (can't resolve)

    try to replace:

    import android.R;

    with:

    import your.application.packagename.R­;

    I think this will solve problem with main.xml

  • I can't figure this out the (R.id.) thing i have tried "Save All", the Clean Project, and made sure it's a plus sign yet still no success please can someone help me.

    Thank You :)

  • For the most part

  • Heya, for all of you getting the R.id error also after hitting "save all" button, the solution might be cleaning the project (Project -> Clean...). It worked for me! If it works for you too gimme some thumbs up for visibility :]

  • @Jpoulte ME TOO! I have followed all the directions to the T! IDK what I am doing wrong and it sucks being "stuck". I posted in their forum.

    Any help would mean a lot!

  • @BlakeAttebury PS. ANYONE who would be willing to help me, it would mean a lot to me! Please message me. Thank you in advance.

  • Hmm, I have the ID prblem aswell. I have had a read through half of the comments. I have the + on the main.xml and i have saved my work. Yet it still says cannot be resolved or is not a field. The bADD and bSUB arent in that autocomplete like it says on the video, Would this be something to do with declaring it somehiow. But as i said i have added that + to it. Thanks

  • id say you need a base knowledge of java to move onto android java :P

  • Awesome mate! thank you!

  • This episode ended on a major cliffhanger. Can't wait to see the next one!

  • If the R.id is not working go to main.xml and check the "@+id/tvDisplay" it needs a PLUS SIGN

  • @vercoelenmike thanks ive been look for a solution

  • Hello Sir i am R.id error its says id cannot be resolved or not in a field. plz help me wht to do.

  • @zameelrs yes, I'm having the same issues. Save all didn't work for me

  • Also when making changes to folders in your (named) project workspace. Like adding MP3's or images you must clean your project. Once your files are in place, then in Eclipse under the Project tab click clean and your files will appear. All files added to your project must be placed in your (named) workspace not through Eclipse. Again I hope this helps a bit.

  • Hello All, You must make sure you save as you go along. Or it will throw error messages on your code even though it is identical to what your seeing in the tutorial. The system only reads what is saved. Once it is everything will link together. You can either save all. Or there is also an indicator on the tab itself. If you see an * on the tab then there is unsaved code in that specific file. I hope this helps a bit.

  • save all works, thank u, and travis dont miss out on such important things !

  • "id cannot be resolved or is not a field"

    help ! (R.id. error error..

  • "like wow what´s going on" lol

  • void aaa

  • yo guys this is what i did to fix the solution and it worked i saw some imports of r i deleted it then it worked try it out

  • The error which some people are occuring in the R.id.** line's fix is by saving all then closing the windows and reopening them

  • Great one

  • Save all worked perfect for me. Thanks everyone

  • the R.id.bAdd my id is like red underlined saying its wrong how i fix dis stupid shit and is the id necessary

  • you r awesome! for the most part :D

  • This is a great tutorial, but im sad that you had to explain java as if we're all beginners. If you want to learn java, watch the tutorials for java before starting on android!

  • > "Void, Ah!"

    I lawled

  • hey when i works on java the autocompletion feature of eclipse works

    but in android programing it is not working

    can anybody help me??

  • @saurav862 Hit Ctrl + Space for intelesense to pop up at any given point while coding

  • Saving main.xml fixed the R.id problem for me too, thanks guys it was starting to get me down, not having done any of this before - and great tutorials btw, maybe could do with updating for the new software builds ?

  • got a error on add=(Button) findViewById(R.id.bAdd);

    // error is id cannot be resolved or is not a field

  • @nikhil200924 Check the top comments on this video. Right at the top, cant miss them. Basically click file/ save all

  • @walker1054 Save all grayed out. I went through each file I edited and saved individually and still have the error that others are having with the R.id.

  • @walker1054 Nevermind. I was missing the plus sign in main.xml where it says android:id. Sometimes autocomplete bites you in the rear. :(

  • hey for everyone who is going crazy with the R.id error, i went through a bunch of these comments and every basically has some sort of solution, and one of those is bound to work for you, bu ill add mine because i couldnt find my solution anywhere, so anyways, what i did was open up the strings.xml file from package explorer and i noticed there was an error there, fix the error if you have one, it might not work though, so the next thing i did was attempt to create a new string, not from

  • @dvzqz87 the string creater interface but the actually string.xml source code, for WHATEVER reason, i have no fucking idea, for whatever reason, after attempting to do that, and then immediately deleting it.. then saving.. it took away my error.. so add this to the list of solutions for this ridiculously annoying error! have fun

  • Anyone else get the findViewByID error?

  • Save the main.xml file and that should fix the R.id error

  • Best tutorials i ever seen

  • I got my R.id error fixed after i restarted my computer, strange enough.

  • lol ppl here are so motivated and I feel like I can see sparkles from their eyes. BTW i came from 110th tut

  • very clear

  • ok guys here was what it was for me . spent a couple of hours on this . There was an error in the xml file that i had not seen since XML grpahically shows automatically.

    1. In R.java can you see the method final class id ? if you get the R.id ERROR it means you probably cannot see this id .

    2. correct the xml - triple check this .

    3. WINDOW-> CLEAN to remove the files java creates such as gen->R.java

    4. window->Build project ; R.javacreates with classid

  • Comment removed

  • I tried all the troubleshooting steps I could find and the only thing that worked for me was changing the line "import android.R" at the top to "import *yourpackagenamehere*.R" with no stars

    You can find you package name at the very top of the java code... Thumbs up if this helped

  • Tadas156 all u need to do is capitalize the B for button.

  • @shaxaary1 how to do it ? :)

  • 3:46 on my pc it dont shows import textview it only shows create class textView

  • I love this tutorials.

  • My fix for the R.id problem: With your Main.xml file I had a Main.out.xml file. I just had to delete that one :)

  • Comment removed

  • Just build the project to fix the problem with R.id. It works for me. Cheers!

  • Here IS the solution to the R.id error in that your bAdd and bSub are not recognized.

    This is most likely due to the fact that you do not have SWT installed.

    If you go to 0:01 you'll see thenewboston has many other Form Widgets installed, including BUTTON, what we're creating.

    To check if you have this just navigate to the same page he's on and see if Button is listed. If not you will need to install SWT, I found a good tutorial here which fixed this problem for me. goo. gl/ny9Os

  • @TheTizzyTiz where did you see the tutorial on how to add SWT?? I am having the id issue. Any help would be appreciated, cause I am stuck!

  • @mtommy71 goo. gl/ny9Os

    Try that link but delete the space between the . & the g, sorry, YouTube don't allow links in their comments so I had to put it in separated.

  • @TheTizzyTiz ty for the reply on the link for Android tutorial.. I was able to find my problem. I had to go up and click File and Save All. I tried just saving the .xml like someone else had suggested, watched the tutorial you recommended. Then out of ideas, I went up and "saved all"........problem fixed!.

    Anyway, I wanted to thankyou for the help and also let you know how I was able to finally get it fixed just in case you didn't already know that.

  • For those who still have the R.id problem, try saving the XML file after editing it during Tutorial 7. The problem should have solved itself after saving the XML file.

    Thumbs up so that people can see and get help.

  • R.id error any sloutions ??? R.java file doesnt have bAdd or bSub

    ??

  • R.id error any sloutions ??? R.java file doesnt have bAdd or bSub

  • I fixed it by going one episode backwards and creating a whole new project, writing everything new and it worked

  • Hi Guys , For the R.id error , you might as well click on "save all", to save all files (including main.xml) in the project before typing R.id. I believe , eclipse can't recognize the created xml ids if you did not save the main.xml file. Pressing "save all" worked for me. Hope it clarifies the reason we got that error message.

  • @DelaNation <---- what he said.

  • @DelaNation Yes the main reason behind R.id error they all are not saving all the files

  • @DelaNation Thanks a lot :) i downloaded all these videos and whenever i run into a problem i come to the youtube comments for the video and theres always what im looking for in the Top Comment section. thanks:)

  • @DelaNation

    thx.. it worked!

  • my mistake, i had used '=' instead of '+' while setting up the ids

    and i had not saved my main.xml yet (don't if that mattered), but its worth a try for anyone trying to fix R.id error

  • Nothing here worked for me, until I noticed the line 'import android.R;' in my startingPoint.Java. I removed that line and the errors went away, hope this helps.

  • I tried every single thing in the comments and the problem doesn't go away!

  • For anyone that's tried everything else listed here to no avail for the R.id error--

    This is a simple mistake but, make sure that in your main.xml file within the code for each Button you do not have a closing bracket directly after the title text 'Add One' & 'Subtract One'

    When he demonstrates in the last video--he previews the graphical UI after closing that set of lines, but returns to add more information for each button and while doing so moves the closing bracket down to the very end.

  • The solution to this problem is that you simply click Project>Clean.

    Worked first time for myself.

  • @MrWolfChief i did this and i got errors for ALL of my classes now.

  • @HypnotizeCampPosse apparently my R.java file is just gone now...? what?

  • 1.) Completely rewrite the code in a new project. (Lots of copy and pasting, but carefully inspect for syntax errors.)

    2.) Click the error icon next to the line number (it should give you a pop up list of options) and click "create constant field for .id" (or something along those lines, I don't remember the exact wording.)

    3.) Save all. You should get a series of errors, but this just means that your R file is fixing itself.

    This worked for me, at least. Hope this helps!

  • Does anyyone have a Solution to the R.id.sAdd, probleem please shaare, I have tried everything from closing and opening the R.java file, comenting and what not... and still nothing

  • The app didn't work. There is an error on lines 21, 22, and 23. My code says:

    add = (Button) findViewById(R.id.bAdd);

    But it looks like the error is on the "id" in "R.id.bAdd". When I click on the error icon on the line number, it gives me 3 problems:

    - id cannot be resolved or is not a field

    - bAdd cannot be resolved or is not a field

    It does this for every line with an R.id.(insert value here). I have tried opening the R.java file but there are no bAdd and bSub options.

  • People having the "R.id " error just recheck your main.xml file.. run it and check the errors i had a error "textsize" so i replaced it to "textSize" , Case sensitive stuff :P

  • Comment removed

  • Comment removed

  • Comment removed

  • Great tutorials dude! I have a programming background doing a lot of PHP and some other languages but Java has always scared me! At least in PHP you have an option of using classes or not! Hahah.

    Anyway your guides are extremely helpful and easy to follow/catch on.

  • "... void, WHAA!"

  • It does not help me to save main.xlm I still get error under "id" I think there is something missing in my R.java file..

  • Comment removed

  • this is really irritating if you already know how java works

  • You can subscribe to this playlist. Click on "Android Application Development Tutorials (thenewboston)" playlist link under my comment. Thumbs up to help others!

  • If the id comes with an error, comment out that line and just run the app once. It will create the ids when it runs.

  • @pchelper102: I had the same problem. Make sure you save the main.xml in the res/layout folder before you move on to doing that findViewById() stuff. Hope that helps!

  • To fix the R.id error, Just open R.java file once... Then there will be bAdd and bSub options available.. Thumbs up so everybody can get some help

  • Comment removed

  • @coollavanya1997 that didn't work for me...

    what is the code that should be in the R.java file?

  • @Muse94Muse You should not edit the R.java file as it is automatically created. In XML file, delete the bAdd and bSub, save everything. Then try defining the bAdd and bSub again... Hope it helps

  • @coollavanya1997 i just started all over again from part 1 and now it works :P

  • @coollavanya1997 would you please tell me how to open R.java file ? cause i think i did and still can't see the options of bAdd and bSub available! thanks

  • @haflbreeds Just double click R.Java file and then go back to the startingpoint.java

  • Comment removed

  • @coollavanya1997 where can i find R.Java file?

  • @haflbreeds In Application name > gen > com.app > R.java

  • @coollavanya1997 Still doesn't work for me, I opened and saved all files and still doesn't have these buttons available :(

  • @Nutriment6464 Try starting from scratch :(

  • @coollavanya1997 Can you help me please it gives me the error on the .id part in other words the red line is one the .id part the error says "Cannot be Resolved or is not a field" any suggestions plz!

  • @Rayden150 Open R.java and then save everything and quit. Open again and it should work...

  • @coollavanya1997 <3333 His worked.

  • @coollavanya1997

    Hi I did exactly what you said but it still won't show up. There is no id listing in my R.java file at all...

  • @Pendemic Then in StartingPoint.Java delete the bAdd and bSub code and then add it again, save and quit. Open again and it should work :)

  • I did exactly what you did but the id after the R comes up with an error what should i do

  • @pchelper102 same thing here

  • @pchelper102 Try to save what you did in the XML code before proceeding to the .java code!

  • @TheArthurAM This worked for me, thanks!

  • 1:32 "we are gonna keep track of our turtle" :D

  • "main cannot be resolved or is not field",,,,,, help

  • when he said "have a good one I just took a donut from the fridge"

  • You can press Ctrl+shift+O to import everything needed without having to hover over everything and clicking the import line

  • @mangopearandapples

    Awesome! Thanks!

  • @mangopearandapples Awesome, thanks!

  • To fix the findViewById error change import Android.R; to import (project name).R :D hope this helps people!

  • I am getting an error on setContentView(R.layout.main); and on add = (Button) findViewById(R.id.bAdd); what do i do?

  • help me guys.... my findByViewId is returning null :( what to do????

  • @aki25rulz change import android.R; to import (project name).R :D

  • i don't know how many people this is going to help, but if you want to automatically import things (trust me in the future you will import a TON of things) hit the shortcut - CMD SHIFT O, or on windows i think its CTRL SHIFT O {thats o as in the letter}

    it automatically imports everything you need :D

  • what i'm i doing wrong android:id="@+id/tvDisplay"

    display = (TextView) findViewById(R.id.tvDisplay); just doesn't work

  • Thumbs up for amazing tutorials. These are awesome so far!

  • if you're getting an error under id, that says you need to create and id, make sure you save your main.xml file.

  • @dirnol I saved the file but still having an error!

    If you mean set up by doing: "andriod:id="@+id/tvDisplay" I have done that...

    So why don't it work? o_o

  • @GeekyMe97 if that's actually what you did it's cause you spelled android wrong.

  • @ThePheonic Oh lol >_<

    Thanks ^^

  • @dirnol You are the MAN!!! you saved my three day old confusion.... It was so silly of me not to have SAVED THE XML FILE and search the entire internet for a solution. I simply don't know how to thank you!!! Guys Thumbs up dirnols comment so that people can save time :)

  • @7Mehtab :( well, it doesnt matter xD

  • first!

  • @kobbsy nope third!

  • 9 more to go for 2000! Awesome!

  • Hi, im first... yeah.... lol..hate that, good stuff men, good stuff! keep it up!

  • @jeeeerpa congratz!

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more