Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ADT will not allow creation of Android Activity

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?

like image 985
NewShelbyWoo Avatar asked Mar 05 '14 06:03

NewShelbyWoo


People also ask

How do I download and install ADT Android SDK for Windows?

In your browser on the PC, open the Android SDK download page and click Download the SDK Tools ADT Bundle for Windows. On the Get the Android SDK page, you can select either 32-bit or 64-bit, according to your Windows platform. This download includes the SDK tools and the Eclipse IDE.

What is Android ADT bundle?

Android ADT Bundle. The ADT Bundle provides everything you need to start developing apps, including a version of the Eclipse IDE with built-in ADT (Android Developer Tools) to streamline your Android app development. so now we can say its single step download to setup Android development environment.


3 Answers

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.

like image 183
Akshay Avatar answered Oct 14 '22 21:10

Akshay


The comment see comment by NewShelbyWoo solved the issue

like image 26
patrickfdsouza Avatar answered Oct 14 '22 21:10

patrickfdsouza


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 :)

like image 25
MohanRaj S Avatar answered Oct 14 '22 22:10

MohanRaj S