0

Then i have installed all file of SDK and i have created the New Android Application Project, I saw the src is empty, so there wasn't the MainActivity and a lot of file like the apk or ActivityMain. I cleaned a lot of time the project and "Build automatically" is flagged. Eclipse doesn't "run" the apk because there isn't... Anyone know what the problem could be?

  • http://stackoverflow.com/questions/22190578/adt-will-not-allow-creation-of-android-activity – laalto Mar 07 '14 at 18:56

3 Answers3

0

You might have unchecked the "Create activity" box in the New Android Application Project wizard. To generate a new Activity, right click the project and press "New" -> "Other" -> Expand "Android" -> "Android Activity". Now a wizard for creating an Activity should appear.

Whenever you build your project after that, an .apk file should be created.

tobypls
  • 839
  • 1
  • 8
  • 21
  • Thanks a lot! It work, but Do you know how to start it automatically? – leonardodettoileo Mar 07 '14 at 20:55
  • How do you start **what** automatically? If you mean to run the .apk on an Android-device, you just right-click your project and hover on "Run As" -> "Android application". In the new window should be able to chose what device to run the application on. – tobypls Mar 07 '14 at 21:10
  • I'm sorry I have not explained well... I'd like the mainactivity genereted automatically, not I have to manually create it. – leonardodettoileo Mar 08 '14 at 12:04
  • Then you just check the "Create activity" when you create a new project from _"New" -> "Android Application Project"_. – tobypls Mar 08 '14 at 12:21
0

Try updating.
Click "Help" -> "Install new software" and install from https://dl-ssl.google.com/android/eclipse/
I had the same issue before. It seems that the version I downloaded was not up to date.

Aaron C
  • 343
  • 2
  • 9
0

I was also facing this problem, but i figured out. I choosed Empty Activity in step 6 instead of Blank Activity, rest of steps are same as yours.

1. New Android Application Project 
2. Selected API 19 4.4 KitKat for Minimum, target and compile with SDK. 
3. Theme Holo Light 
4. Uncheck create custom launcher 
5. Make sure create activity IS checked, everything else left alone 
6. Create activity checked on next screen and selected Empty Activity 
7. Activity Name and Layout Name left as defaults. 
8. Click finish..

I hope this will work for you too.

FAISAL
  • 459
  • 8
  • 22