Pergunta

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?

Foi útil?

Solução

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.

Outras dicas

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.

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top