android eclipse not creating blank activity
The problem is, in Eclipse, the new >> Project >> Android >> Android Application Project >> BlankActivity does not create any Activities in the src directory, and does not include the Activities in the manifest.xml.
I know this question has been asked before:
- Eclipse Juno won't create Android Activity
- Eclipse doesn't create Main Activity and layout
- Eclipse android project not creating blank activity
However, the selected answers to these all say somthing like:
click "Help" -> "Install new software" and install (this will update it) from this url: https://dl-ssl.google.com/android/eclipse/
The above answer did not work for me. Here are some details of my setup:
- Installed "Eclipse ADT" from the Android website
- Followed the installation instructions (unzipped contents and opened Eclipse)
- Downloaded necessary APIs using the ADT Manager
Tried creating new >> Project >> Android >> Android Application Project >> BlankActivity, this worked fine except no Activity in src or manifest.xml.
Tried the answer given in other SO questions, i.e. "Install new software" and install (this will update it) from this url: https://dl-ssl.google.com/android/eclipse/ . This updated "Development Tools" to version 23.0.
- Tried creating new >> Project >> Android >> Android Application Project >> BlankActivity, but still did not work.
I know I could install these files manually, but I am following the Android Dev Tutorials and they often assume the base project creation worked perfectly, and do not give the source files.
its currently bugged if you updated to 23.0. see https://code.google.com/p/android/issues/detail?id=72419
Just wanted to add, I switched from Eclipse ADT to the Android Studio and all of the Activity creations work perfectly (i.e. BlankActivity, as well as all of the others). It also fixed another bug I was experiencing with the GUI preview in Eclipse.
I had the same problem. I tried installing the ADT plugin + Eclipse bundle and when I tried their "My First App" example Eclipse would not create an activity.
Manually installing Eclipse first and then adding the latest ADT plugin worked for me.
- I installed Eclipse Standard 4.4 first (http://www.eclipse.org/downloads/).
- Then I installed the Android SDK (https://developer.android.com/sdk/index.html - use the "GET THE SDK FOR AN EXISTING IDE" link)
- Then I installed the ADT plugin for Eclipse (https://developer.android.com/sdk/installing/installing-adt.html)
- Then I was able to follow their demo project successfully.
Eclipse does automatically create new activities and I can run the application on an actual device.
Hope that helps.
I bypassed this issue by creating Empty Activity instead of Blank Activity while creating new android project. Empty Activity provided same code as that of Blank Activity