Ledbelly2142
Aspiring developer
Profile
Posts: 80
Reg: Aug 04, 2012
Reno
6,750
09/22/12 03:02 PM (13 years ago)

Just downloaded source code, lots of R cannot resolve to a variable...

I'm using Google API8, but have lots of errors. Seems like all the new BT plugins using an R variable that is not defined. I think this means that the java file that defines the R variable is missing. Wondering if I should rebuild and download my BT app again... The app worked before, I added the new timer plugin. Anyone have this issue before? Thanks, -Led
 
RobK
Lost but trying
Profile
Posts: 73
Reg: May 19, 2012
Milton Keynes
6,530
like
09/22/12 03:48 PM (13 years ago)
I posted a similar problem earlier today! When it rebuilds it deletes the r.java file but if you have errors in your code it stops the build and causes the problem The problem I had was with a new Splash screen I was trying to make. Once I sorted that out it worked. So check the new plugin for errors then ensure Project -> Build Automatically is ticked then when you correct the error once you save the offending activty the r.java file will be recreated and those other 'R.' errors will go.
 
Ledbelly2142
Aspiring developer
Profile
Posts: 80
Reg: Aug 04, 2012
Reno
6,750
like
09/22/12 03:56 PM (13 years ago)
I removed the timer plugin and downloaded the source code again... only 162 errors instead of 575. The type of errors I am getting are for some of the plugins, such as in the BT_screen_quiz.java, screen_quiz cannot be resolved, and other image pointers like R.idbtnDisLike are not resolved. Seems like I'm using the wrong compiler, but I'm using 1.5 which I think is suppose to work. Also using Google APIs API8. I am fairly new, so I could easily be missing something simple when importing the BT source code into Eclipse, but I'm pretty sure I did it correctly. Any suggestions? Thanks!
 
Ledbelly2142
Aspiring developer
Profile
Posts: 80
Reg: Aug 04, 2012
Reno
6,750
like
09/22/12 03:59 PM (13 years ago)
Oh, I did change the screens by removing the background colors. Will define and rebuild, see what happens.
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
09/22/12 04:03 PM (13 years ago)
@Ledbelly2142 try using Buzztouch 2.0, its more stable in Eclipse for me than 1.5 With the new plugins as well. There aren't any errors Have you imported your project correctly, which Eclipse/ADT version are you using? in the meantime check out some of the documents posted by GoNorthWest, especially this one: Common errors and solutions pdf http://www.buzztouch.com/files/howtos/Common_Android_Errors_and_Solutions_v1.0.pdf
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
09/22/12 04:23 PM (13 years ago)
This is such a challenge! One idea is to make sure there aren't any file names in the drawables folder that has caps.
 
Ledbelly2142
Aspiring developer
Profile
Posts: 80
Reg: Aug 04, 2012
Reno
6,750
like
09/22/12 04:45 PM (13 years ago)
Nope, still having the same problems. Lots of the same errors. I have 112 errors... things like: btnAnswer_1 cannot be resolved or is not a field documentTypeIcon cannot be resolved or is not a field Pretty frustrated, still not sure what systemically is wrong. I have another workspace for my previous source code that works, it's only the new source code that I recently downloaded that is not working with the Google API 8 and Java compiler 1.5.
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
09/22/12 04:52 PM (13 years ago)
Hey LedBelly, You're not using the Menu List Advanced are you? There have been a lot of reports that this plugin caused those errors. David buzztouchmods.com
 
Ledbelly2142
Aspiring developer
Profile
Posts: 80
Reg: Aug 04, 2012
Reno
6,750
like
09/22/12 04:59 PM (13 years ago)
@mysps Im using BT 2.0, but Java Compiler version 1.5. I have been going over GoNorthWest's HowTos for the past several hours. Trying to find something simple I missed. I think I am using the 64 bit version of Eclipse, which may be buggy. @Susan, No caps in any of the drawable folders. I do have an error in the layout folder in screen_timer.xml which is: Couldn't resolve resource @string/Stop Couldn't resolve resource @string/Chronometer This may or may not have anything to do with the new timer plugin that I installed, then removed (screen) and rebuilt and downloaded the source code... Any idea what the screen_timer.xml does? I tried to google it, no luck. I wonder if this has anything to do with the other crashes I'v been having. Almost time to start contemplating this one over a bottle of wine. May not resolve the issue any sooner, but it will make it more fun. -Led
 
Ledbelly2142
Aspiring developer
Profile
Posts: 80
Reg: Aug 04, 2012
Reno
6,750
like
09/22/12 05:03 PM (13 years ago)
@MrDavid, pretty sure I'm not using anything in advanced... I'm using the following plugins: Notepad Launch Native App Splash Screen Device Info Allow GPS Menu with Image HTML Doc App Rater Interactive Quiz Send Email All of these worked (for the most part) before I rebuilt and downloaded the source code again. -Led
 
Ledbelly2142
Aspiring developer
Profile
Posts: 80
Reg: Aug 04, 2012
Reno
6,750
like
09/22/12 05:05 PM (13 years ago)
I really think there is something similar to using the wrong API or wrong version of Java compiler. -Led
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
09/22/12 05:06 PM (13 years ago)
@Led, Gotcha - android is a tough cookie, hoping you get through this with everyone's help, you're in good hands. Cheers, David buzztouchmods.com
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
09/22/12 05:06 PM (13 years ago)
oh yeah i had to change mine from 64 to 32 bit in the beginning as well. that could be your issue. About the timer, I have it installed using buzztouch 2.0 and I didn't get that error. Here is what should be added to the very end of the layout/strings.xml file right above </resources>. <string name="Start">Start</string> <string name="Pause">Pause</string> <string name="Stop">Stop</string> <string name="Chronometer">Chronometer</string> <string name="Reset">Reset</string> You shouldn't get any errors. Try downloading Eclipse with 32bit. Im on a mac by the way. I hope this helps!
 
Ledbelly2142
Aspiring developer
Profile
Posts: 80
Reg: Aug 04, 2012
Reno
6,750
like
09/22/12 05:16 PM (13 years ago)
Went back and checked the older version of the source code I have for my app, I notice that there is no screen_timer.xml I think this has to do with the timer plugin that I added, then removed in BT 2.0. Really smells like my app build is jacked up with old garbage. Checking my settings in Eclipse (working with older source code), they appear the same. There may be some obnoxious check box unchecked for something... but I doubt it. I hope this isn't iOS 6 tweeking fallout.
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
09/22/12 05:23 PM (13 years ago)
Try added it again to Eclipse. Android gives me lots of headaches too but with a little patience :) and trying to import the project again you might have luck!
 
Ledbelly2142
Aspiring developer
Profile
Posts: 80
Reg: Aug 04, 2012
Reno
6,750
like
09/22/12 05:26 PM (13 years ago)
Well... I deleted the timer xml and java files (2 total) and guess what, no more errors. Wow, note to self: adding and removing screens/actions must be verified. Thanks everyone for your help. Cheers, -Led
 
shenry
Aspiring developer
Profile
Posts: 469
Reg: Jan 10, 2012
Orange County, ...
13,390
like
09/23/12 08:47 AM (13 years ago)
David, Are you saying that we should not use BTM: Menu Simple Advanced if we are going to use GoogleAPI8, because there have been a lot of reports that this plugin caused those errors.
 
Ledbelly2142
Aspiring developer
Profile
Posts: 80
Reg: Aug 04, 2012
Reno
6,750
like
09/23/12 03:43 PM (13 years ago)
Just download the source code again, getting lots of BT_xxxxx files for screens that should not be there in my source code. For example, I do not have the screens in my app but they are appearing in my src file: BT_screen_blank.java BT_screen_customHTML.java BT_screen_cutomURL.java BT_screen_excelDoc.java BT_screen_menueButtons.java BT_svreen_menueListSimple.java Mac_image_gallery.java and roughly 15 more that are not in my app. Now I thought the MacImagegallery was only for iOS? (yes, it's supposed to be, I just find it interesting that the only errors in the .java file is a reference to a layout file). Seems like my source code server settings may be messed up. I'm thinking I need to scrap this BT app and start over... lots of wasted time :-( May need help from the big guy. -Led
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
09/23/12 03:53 PM (13 years ago)
I think that is how it is supposed to work. You may not have all the screen types in your app now, but they are there if you need them.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.