40

I installed the ADT bundle from http://developer.android.com/sdk/index.html yesterday, and I was following a basic Hello World tutorial. I created a new Android Application Project with a Blank Activity named MainActivity. The resulting project has an empty src folder and empty res\layout folder. There is a R.java file in the gen folder but it has no reference to MainActivity. This is what the SDK manager says I have installed

  • Android SDK Tools v 22.6
  • Android SDK Platform-tools v 19.0.1
  • Android SDK Build-tools v 19
  • SDK Platform v 3
  • ARM EABI v7a System Image v 2
  • Android Support Library v 19.0.1
  • Google USB Driver v 9

I also tried manually creating an activity by right clicking the src folder and going to Android Activity, but when I hit Finish on the creation wizard, nothing happens. Does anyone have any clues as to what's going on? Did I miss a key component to install or something?

NewShelbyWoo
  • 722
  • 1
  • 7
  • 21
  • 1
    Same issue in AOSP tracker: https://code.google.com/p/android/issues/detail?id=66647 – laalto Mar 05 '14 at 11:15
  • just as an update, it's 3/9/14, and I can't get the Eclipse/ADT to work right on either my Linux desktop or Mac Laptop. Something's obviously "not right" as I get consistent repo erros on the google link for ADT. You can download directly, but even that has major issues when trying to setup/configure a new project. It's just borked right now. – AnthonyAlmighty Mar 09 '14 at 21:24
  • 1
    it is a known issue, please follow http://stackoverflow.com/questions/22190076/cannot-create-or-edit-android-virtual-devices-avd-from-eclipse-adt-22-6/22198007#22198007 – Yash Krishnan Mar 10 '14 at 08:39
  • Same issue. Also with layouts. Not working using Adt bundle 2014-06-24 – nVentimiglia Jun 30 '14 at 22:02

6 Answers6

14

If you updated to Android SDK Tools version 22.6, you are required to Update DDMS Tools and Plugins.

Go to "Help Menu Bar" -> "Install New software" and install (this will update it) url: https://dl-ssl.google.com/android/eclipse/

Also update "Developer Tools" and "NDK Plugins" to latest Version. This steps is useful for me and worked also.

G. Blake Meike
  • 6,615
  • 3
  • 24
  • 40
Akshay
  • 348
  • 4
  • 12
  • 2
    I downloaded my Android ADT on Feb. 4 2014. Sample activities worked but I could not create activities in my own Android projects. After following user2276721's helpful advice, now I can new up an android activity using NEW>> Android Activity>> (dialog). The plugin creates the code and alters all appropriate XML files. At its last step it shows you all changes it makes. Cool. – Jalkin Mar 10 '14 at 15:58
6

The comment see comment by NewShelbyWoo solved the issue

Community
  • 1
  • 1
patrickfdsouza
  • 747
  • 6
  • 17
3

It's new feature of ADT 22.6.2

Even in "None" theme ADT(22.6.2) create "Fragment Layout"

There is four ways:

Try to change "Target" and "Compile" to API 14 or higher. But you need then remove all entries of "Fragment Layouts"

Uncheck "Create activity" checkbox, and create activity manually. Good howto: Best way to add Activity to an Android project in Eclipse?

Downgrade to 22.3.0 for example

Try to change templates. In link below you find howto.

I use third way for my apps with APIs lower 14. In different directories I have installed 22.3.0 and 22.6.2

There in 22.6.2 is some other bugs with blank files and problems with AVD. New version of ADT really buggy...

Look also this links:

ADT blank activity created with fragment activity..

Eclipse doesn't generate MainActivity.java & activity_main.xml

and search.,

https://stackoverflow.com/search?q=adt+22.6

i followed those steps to solve the above problem. Hope this is work's,Thank you :)

Community
  • 1
  • 1
MohanRaj S
  • 1,958
  • 4
  • 30
  • 54
0

When you upgrade to SDK tools by 22.x you need to upgrade ADT plugin. follow these steps to upgrade ADT:

Help > Install New software install

add the below url and click on next.

url: https://dl-ssl.google.com/android/eclipse/.

But some times it complaining about conflicts, in that case,

First uninstall the existing ADT plug in. and try again.

To Uninstall Existing ADT plug in:

Help>About Eclipse Platform> and delete the pluging.

now follow the above steps.

raju
  • 1,254
  • 13
  • 18
0

workspace has to be set to the the SDK folder. After doing this, I have had no problems. For example, after downloading and installing Eclipse, my directory structure is as follows:

/Users/username/Development/adt-bundle-mac-x86_64-20140702/
    /eclipse/
    /sdk/
        /HelloWorld/

It's annoying because the default workspace was set as documents/workspace (changing permissions with chmod 777 workspace didn't work in my case. Plus it's inconvenient that all my projects are mixed in with other folders in the SDK folder.

dbconfession
  • 1,147
  • 2
  • 23
  • 36
0

With Luna and ADT plug-in version: 23.0.4.1468518 there is a patch available right now to fix:

https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&groupby=&sort=&id=82393

Just follow directions near bottom to uninstall and download and install the issue as archive|local

Droid Teahouse
  • 893
  • 8
  • 15