Domanda

With the new ADT plugin, whenever I create a new Activity, it extends ActionBarActivity probably because of app_compact_v7 library that is automatically added. Is it possible to disable this feature and still use the Support library in my project? I know the need for backward compatibility but I prefer ActionBarSherlock library and not AppCompact. So is it possible to do away with automatic app_compact_v7inclusion in my project's?

Thanks.

È stato utile?

Soluzione 2

You can't "do away with it", if you use the new-project or new-activity wizards. Near as I can tell, the templates there want you to use appcompat-v7, as of v22.6.1.

Your choices are:

  • Stick with the new-project wizard and rip out the appcompat-v7 stuff by hand, or

  • Copy or import some other Eclipse project as a starting point, one that does not have appcompat-v7 in it

Altri suggerimenti

I had the same problem until I started creating the app I was taught in class. Here is what I did to stop using appcompact_v7:

  1. Started new Android Application Project

  2. Named the project whatever you want

  3. Changed Minimum Required SDK to API 14: Android 4.0 (IceCreamSandwich)

  4. Left everything else default and you can press Finish or Next

That stopped the ADT from using appcompact_v7 for me at least.

Continues answer of Nate, if you want add other API to you project Follow the next steps:

  1. Started new Android Application Project

  2. Named the project whatever you want

  3. Changed Minimum Required SDK to API 14: Android 4.0 (IceCreamSandwich)

  4. Left everything else default and you can press Finish or Next'

  5. Change the AndroidManifest.xml with the API that you want

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top