R.java will not update - Help!!

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

R.java will not update - Help!!

Postby rmanromga » Thu Dec 20, 2007 7:12 am

Hi Guys,

I am working on the notebook tutorial. However, when I add a resource to the res/layout folder, R.java does not get update. I am using Ubuntu Gutsy as my OS (However, it works when I boot to Windows - but of course I do not want to develop in Windows.) Other notes on my environment...

Eclipse Europa (3.3)
sdk version is: android_sdk_linux_m3-rc37a
Eclipse Plugin Version is 0.3.3 (I think)

I have tried everything... deleted R.jav (it does not get added)
I have tried changing something in the xml files to "force" a reload of R.java, but nothing happens...

Please help!
rmanromga
Developer
Developer
 
Posts: 43
Joined: Thu Dec 20, 2007 6:21 am
Location: Baltimore, MD USA

Top

Postby plusminus » Thu Dec 20, 2007 3:34 pm

Hello rmanromga,

searched a bit for possible solutions on the gGroups:
...
i've faced the same issue and found out the reason that i've
accidentally deleted the app_name entry from strings.xml. problem is
solved after re-adding it

indeed eclipse tells about missing entries in xml files
(AndroidManifest.xml in this case)
...

:idea: Perhaps there is an error not really shown to you...
:arrow: Does it happen the same way on a new project :?:

Are you using a Sun JDK :?: (which version) :?:

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby rmanromga » Thu Dec 20, 2007 3:41 pm

Yeah I saw that post too and I double checked my AndroidManifest.xml file and the app name is in there....

I am using the SUN jdk 1.6...

and yes it is happens even with new projects....
rmanromga
Developer
Developer
 
Posts: 43
Joined: Thu Dec 20, 2007 6:21 am
Location: Baltimore, MD USA

Postby plusminus » Thu Dec 20, 2007 4:35 pm

Hm :?

not really more for me to say here.... :(
Does it recognize explicitly written wrong code :?:

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby rmanromga » Thu Dec 20, 2007 4:53 pm

Yeah plusminus, very baffling... there are no errors that are reported... when you say "report explicitly wrong code", do you mean the editor reporting syntax errors ? If so, yes as far as I can tell, errors that I type are reported....

Can anyone one reply to me if they are successfully developing on Ubuntu 7.10 w/Eclipse and Sun jdk 1.6? It will be appreciated!!

--Dennis
rmanromga
Developer
Developer
 
Posts: 43
Joined: Thu Dec 20, 2007 6:21 am
Location: Baltimore, MD USA

Postby plusminus » Thu Dec 20, 2007 5:19 pm

:larrow: Out of ideas :(

Anyone else :?:

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Top

Postby rmanromga » Fri Dec 28, 2007 4:03 am

Hello all,

I just wanted to provide an update to this issue and how it ended up
working for me... The tutorial says that after adding a resource or
making changes, once the file in question is saved, then the R.java
gets updated... in windows it worked this way for me, but for some
reason after struggling with this in Ubuntu Gutsy with Eclipse & Sun
Java 6, I found out that R.java is updated AFTER compiling the
project.... Can anyone confirm this?? Either way once it was working,
I decided to continue coz this was really holding me back.....
rmanromga
Developer
Developer
 
Posts: 43
Joined: Thu Dec 20, 2007 6:21 am
Location: Baltimore, MD USA

Have the same problem and solved also by editing xml

Postby wazabe » Fri Feb 01, 2008 11:45 am

...
i've faced the same issue and found out the reason that i've
accidentally deleted the app_name entry from strings.xml. problem is
solved after re-adding it

indeed eclipse tells about missing entries in xml files
(AndroidManifest.xml in this case)
...


I had the same problem while trying to go over "known boundaries" in XML editing.
It has make lots so much time and more frustating it was working with other projects of my workspace.

This problem was overcome by commenting areas of my xml project files (from recent to non-recent) and aapt came back to work normally.

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <resources>
  3. <!-- Drawables -->
  4.         <drawable name="transparent_background">#00000000</drawable>
  5.         <drawable name="translucent_background">#e0000000</drawable>
  6.         <drawable name="screen_background_black">#ff000000</drawable>
  7.  
  8. <!-- Animation -->
  9. <!--
  10. <set xmlns:android="http://schemas.android.com/apk/res/android">
  11.         <translate android:fromXDelta="100%p" android:toXDelta="0" android:duration="300"/>
  12.         <alpha android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="300" />
  13. </set>
  14. -->
Parsed in 0.002 seconds, using GeSHi 1.0.8.4


Hope this post will save you time.
User avatar
wazabe
Freshman
Freshman
 
Posts: 8
Joined: Fri Jan 18, 2008 10:49 pm

Postby Jacobien » Wed Jan 13, 2010 9:17 pm

I had this problem as well, for me it was caused by using capital letters in my xml file name. :oops:
Jacobien
Once Poster
Once Poster
 
Posts: 1
Joined: Wed Jan 13, 2010 9:11 pm

Re: R.java will not update - Help!!

Postby blundell » Wed May 26, 2010 9:49 pm

I just got this error :-)

It was as I was nesting a relative layout in a linear layout x 2 with the relative calling the wrong linear when it was built then correcting it afterwards bashing ctrl+s all the time :p R.java couldnt keep up.

So for anyone I would just recommend like the post above , trace back with ctrl+z through what you changed in your XML file :-)
User avatar
blundell
Master Developer
Master Developer
 
Posts: 1610
Joined: Tue Nov 18, 2008 12:58 pm
Location: UK

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: No registered users and 5 guests