ADT will not allow creation of Android Activity

The question:

I installed the ADT bundle from 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 reslayout folder. There is a 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?

The Solutions:

Below are the methods you can try. The first solution is probably the best. Try others if the first one doesn’t work. Senior developers aren’t just copying/pasting – they read the methods carefully & apply them wisely to each case.

Method 1

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)

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

Method 2

The comment see comment by NewShelbyWoo solved the issue

Method 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 & activity_main.xml

and search.,

i followed those steps to solve the above problem.
Hope this is work’s,

Method 4

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.


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.

Method 5

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:


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.

Method 6

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

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

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Comment