I am still new in android development and just decided to learn. however i encounter some problem that drive me nuts this couple hours.. i just want to create a new project with this setting
the problem is i can't create new blank activity with it, it says it requires a build target API version of at least 14, and the current version is 8
I just want to try build an app that support from Android 2.2 (API 8) onwards.. is that just not possible right now to create an Android 2.2 compatible apps with blank activity template? so in order to use blank activity template i must use Android 4.0 (API 14)? is that correct?
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, yep )
https://stackoverflow.com/search?q=adt+22.6
Added some new ways.
How I use it now:
Enjoy! )
it is going to be tricky building for such a version, you may leave you minimum Sdk at yoru desired. Still you must increase max, also if your minimum is anything less than 15, the ADK is now building an extra folder(new stuff) In truth the new version of the ADt is annoying, I am just starting and now you will see they have enforced the use of fragments.
I figured out that we can use Empty Activity instead of Blank Activity. Now in Empty is created a fragment, layout and R.java is updated.
I was in the same boat so I tried....And it worked!
This is with a brand new empty project i tried to start with SDK 8 set for min and target.
I was able to change the min and target SDK to a higher version(in my case 21). That allowed me to add an "Empty Activity". After the activity was added I just change the min and target back to 8. There were not any compile complaints and I was able to run it in a 2.2 emulator after I did the change
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With