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.
Solution 1:
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.
Solution 2:
Create a new Android Application Project
and uncheck Create activity
in step two (Configure project).
Solution 3:
Why my eclipse automatically adds appcompat v7 library support whenever i create a new project
Because your target SDK is set to 15, in which the Action Bar is on by default and your minimum supported SDK is set to 10. Action Bar come out in 11, so you need a support library, Eclipse adds it for you. Reference.
You can configure project libraries in the build path of project properties.