Strange R.Java problem?

Common bugs/problems with the Android SDK the Emulator and the ADT-Plugin.

Strange R.Java problem?

Postby Kullorki » Sat Oct 30, 2010 11:30 am

I don´t know why and i don´t know how this error appeared, but I wrote my programm and everything was fine,
Until i editet my xml file (layout)(added some buttons and labels).
Suddenly there were some strange errors that made eclipse 3.4 crash.
Since then i always get the error
"R cannot be resolved"
if i write this
"setContentView(R.layout.main);" or any other layout
also theres an error that says unknown aadt error, check console
but the console is empty.. ?

i thought of creating a new projekt and simply copy the code into it
but then i get this error
Image
and everything is red
String cannot resolved to a type
int cannot resolved to a type
File cannot resolved to a type
........ almost everything

Do i have to reinstall everything, or is this a very simple thing I can fix?
Kullorki
Freshman
Freshman
 
Posts: 5
Joined: Sun Oct 17, 2010 7:42 pm

Top

Re: Strange R.Java problem?

Postby Ath » Sat Oct 30, 2010 11:55 am

Try a Clean and a Build of your project.
Installing Eclipse 3.5.1/Ganimede (Google advised) or 3.6/Helios (current release) won't hurt either, as a lot of the performance issues and bugs found in 3.4 (2008 released...) are fixed.
Eclipse can't be upgraded from 3.x to 3.y, so a new install (and plugins install) is required. A lot of 3rd party plugins have specific releases for each Eclipse version, so it might take a little time ;)
The Google Android SDK plugin isn't that picky about Eclipse versions, I've been using it successfully on 3.6, but Google recommends the 3.5.1 release.

HTH
/Ath
Ath
Developer
Developer
 
Posts: 42
Joined: Sun Jun 06, 2010 6:07 pm
Location: NL

Re: Strange R.Java problem?

Postby Kullorki » Sat Oct 30, 2010 7:13 pm

wow thanks i installed eclipse 3.6 now and everything works great
THANKS :D :) :D :)

edit: one litle problem

i tryed to test my app , it is starting the emulator, and the console says succesfully installed,(the emulator itself does not show that it is installing) and i can´t find the app on the emulator? ( my first application )
Kullorki
Freshman
Freshman
 
Posts: 5
Joined: Sun Oct 17, 2010 7:42 pm

Re: Strange R.Java problem?

Postby jayesh.thadani » Tue Nov 02, 2010 5:55 am

Try to install application by "adb shell" commands.
Run your emulator and then try to use adb command
And yes Eclipse 3.5(Galileo) is preferable with ADT 0.9.9
jayesh.thadani
Junior Developer
Junior Developer
 
Posts: 18
Joined: Tue Jan 13, 2009 2:50 pm
Location: India

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: No registered users and 6 guests