Eclipse: After upgrading to ADT 22, generated files (R.java, Manifest.java) are no longer generated. I can no longer build any Android project.

18,827 views
Skip to first unread message

Streets Of Boston

unread,
May 15, 2013, 4:51:31 PM5/15/13
to adt...@googlegroups.com
I just updated my ADT to revision 22 (Eclipse Juno SR2).
I updated the Android plugin to revision 22 as well.

And now, R.java and Manifest.java are no longer generated. I'm dead in the water.

Even creating a brand new Android Application project exhibits this issue. 

Is there a way to revert back to revision 21?

Thank you.

Mark Murphy

unread,
May 15, 2013, 4:54:44 PM5/15/13
to adt...@googlegroups.com
Have you tried a command-line build? Sometimes I find that I get more
error information that way, which can perhaps help you diagnose
whatever you're running into.

BTW, what's Manifest.java? Do you mean BuildConfig.java?
> --
> You received this message because you are subscribed to the Google Groups
> "adt-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to adt-dev+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in NYC: http://marakana.com/training/android/

Streets Of Boston

unread,
May 15, 2013, 4:58:51 PM5/15/13
to adt...@googlegroups.com
Sorry, yes, the BuildConfig.java and R.java.

The 'gen' directory remains entirely empty, which causes most of the other sources to have compile errors (class R not found).

Streets Of Boston

unread,
May 15, 2013, 5:22:58 PM5/15/13
to adt...@googlegroups.com
When I use Gradle, a build goes fine (I get a JAR or an APK). However, Gradle uses a entirely different way of building Android projects in Eclipse (or Ant).

When I use Ant, i get this error when I build an almost empty project:
C:\Android\workspace_github\MainActivity>ant debug
Buildfile: C:\Android\workspace_github\MainActivity\build.xml

-set-mode-check:

-set-debug-files:

-check-env:
 [checkenv] Android SDK Tools Revision 22.0.0
 [checkenv] Installed at C:\Android\android-sdk-windows

-setup:
     [echo] Project Name: testy2
  [gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:

BUILD FAILED
C:\Android\android-sdk-windows\tools\ant\build.xml:479: SDK does not have any Build Tools installed.

Total time: 0 seconds

I wonder what this error means "SDK does not have any Build Tools installed".

Mark Murphy

unread,
May 15, 2013, 5:26:04 PM5/15/13
to adt...@googlegroups.com
On Wed, May 15, 2013 at 5:22 PM, Streets Of Boston
<flying...@gmail.com> wrote:
> BUILD FAILED
> C:\Android\android-sdk-windows\tools\ant\build.xml:479: SDK does not have
> any Build Tools installed.
>
> Total time: 0 seconds
>
> I wonder what this error means "SDK does not have any Build Tools
> installed".

Off the cuff, it feels like Ant can't find your platform-tools/ or
tools/ in your PATH, but that's just a guess.

Streets Of Boston

unread,
May 15, 2013, 5:31:38 PM5/15/13
to adt...@googlegroups.com
mmm... 
It all worked fine before I upgraded to revision 22. I wish there was a way to revert back to rev. 21 and wait until they fix this bug.

Siva Velusamy

unread,
May 15, 2013, 5:36:00 PM5/15/13
to adt...@googlegroups.com
- Open SDK Manager. Make sure you are at r22.
- You should see a build tools section. Install that.

On Wed, May 15, 2013 at 2:31 PM, Streets Of Boston
<flying...@gmail.com> wrote:
> mmm...
> It all worked fine before I upgraded to revision 22. I wish there was a way
> to revert back to rev. 21 and wait until they fix this bug.
>
>
> On Wednesday, May 15, 2013 5:26:04 PM UTC-4, Mark Murphy (a Commons Guy)
> wrote:
>>
>> On Wed, May 15, 2013 at 5:22 PM, Streets Of Boston
>> <flying...@gmail.com> wrote:
>> > BUILD FAILED
>> > C:\Android\android-sdk-windows\tools\ant\build.xml:479: SDK does not
>> > have
>> > any Build Tools installed.
>> >
>> > Total time: 0 seconds
>> >
>> > I wonder what this error means "SDK does not have any Build Tools
>> > installed".
>>
>> Off the cuff, it feels like Ant can't find your platform-tools/ or
>> tools/ in your PATH, but that's just a guess.
>>
>> --
>> Mark Murphy (a Commons Guy)
>> http://commonsware.com | http://github.com/commonsguy
>> http://commonsware.com/blog | http://twitter.com/commonsguy
>>
>> Android Training in NYC: http://marakana.com/training/android/
>

Streets Of Boston

unread,
May 15, 2013, 5:53:45 PM5/15/13
to adt...@googlegroups.com
Thank you! That was it.
I had to restart the SDK Manager to see this new item and the new Platform-Tools revision 17.

Now i'm fighting other issues.... exports from 'libs' directory in Library projects no longer seem to be exported automatically....

Xavier Ducrohet

unread,
May 15, 2013, 9:31:22 PM5/15/13
to adt...@googlegroups.com
go in project settings, build path section, in "export and order" see if the library container is exported.
--
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

Streets Of Boston

unread,
May 16, 2013, 9:53:36 AM5/16/13
to adt...@googlegroups.com
Thank Xavier!

It was indeed an issue with 'Order and Export' of the Java Build Path.

When upgrading, the 'Order and Export' of the new 'Android Private Libraries' is not always checked. And the android-support-v4.jar is now in this 'Android Private Libraries' section. 

To fix this, go to 'Order and Export' and check 'Android Private Libraries'. Then refresh/clean/rebuild.

After you done this 'fix' for a library project, you may need to just close and re-open any depending project, because they may not see this 'fix' immediately. 

Pankaj Jakhar

unread,
Jul 1, 2013, 3:41:22 AM7/1/13
to adt...@googlegroups.com
Do one thing only, just update your Android SDK and all is done. You will see no errors.

philipp....@gmail.com

unread,
Jul 5, 2013, 5:17:42 AM7/5/13
to adt...@googlegroups.com
I tried all that what you have written above, but still it doesnt work. Still i got the "R.java cannot be resolved to a type"-bug throughout my whole project.
Neither eclipse nor android-studio works. Only chance it works a little bit is by using "make" from command-line on linux. 

i got some native code (c c++) in the project. could this be the source of error?

Augustus Francis

unread,
Jul 11, 2013, 5:39:29 PM7/11/13
to adt...@googlegroups.com
Open Android SDK Manager
Install
1.Android SDK Manager
2.Android SDK Platform Tools
3.Android SDK Built Tools
4.Android Support Library (Solves the R.java problem, for me)
5.ARM EABI v7a System Image(optional)


Moajiz Farooqui

unread,
Aug 12, 2013, 4:03:57 AM8/12/13
to adt...@googlegroups.com
I was facing the same issue. Below steps worked for me today. Just has had to take up the updates and then I tried creating a new Android App Project which generated the code. Some how my existing project did not get fixed. Instead of resolving I created a new one.

陈明强

unread,
Oct 30, 2013, 11:23:44 AM10/30/13
to adt...@googlegroups.com
 thanks, I checked the 'Android Private Libraries', It worked well.

在 2013年5月16日星期四UTC+8下午9时53分36秒,Streets Of Boston写道:
Reply all
Reply to author
Forward
0 new messages