Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Eclipse automatically add appcompat v7 library support whenever I create a new project?

Why does Eclipse automatically add appcompat v7 library support whenever I create a new project?

I am creating a simple project whose MainActivity should extend Activity, but it does not. Eclipse automatically adds action bar support.

How do I create a simple project without the appcompat library? FYI, I have downloaded the latest version of ADT with everything updated recently. I am using Window 7 x64.

Enter image description here

like image 530
Talha Q Avatar asked Mar 07 '14 21:03

Talha Q


2 Answers

As stated in Android's Support Library Overview, it is considered good practice to include the support library by default because of the large diversity of devices and the fragmentation that exists between the different versions of Android (and thus, of the provided APIs).

This is the reason why Android code templates tools included in Eclipse through the Android Development Tools (ADT) integrate them by default.

I noted that you target API 15 in your sample, but the miminum required SDK for your package is API 10, for which the compatibility libraries can provide a tremendous amount of backward compatible APIs. An example would be the ability of using the Fragment API which appeard on API 11 (Android 3.0 Honeycomb) on a device that runs an older version of this system.

It is also to be noted that you can deactivate automatic inclusion of the Support Library by default.

like image 59
Halim Qarroum Avatar answered Oct 10 '22 23:10

Halim Qarroum


Create a new Android Application Project and uncheck Create activity in step two (Configure project).

like image 32
songhir Avatar answered Oct 10 '22 23:10

songhir