Reputation: 3565
My sdk folder is having two android-support-v4.jar
files :
/sdk/extras/android/support/v7/appcompat/libs/android-support-v4.jar
/sdk/extras/android/support/v4/android-support-v4.jar
Just to keep things clean, i want to remove one of these duplicate libraries. Which do you think is the safest one to remove and why?
Note : In case this info helps - I was using the ADT bundle earlier(which had Eclipse Juno i think ), now i am using the latest Eclipse Luna(downloaded from eclipse.org) with the latest ADT plugin(installed from https://dl-ssl.google.com/android/eclipse) and the latest support library downloaded using the sdk manager
.
Upvotes: 1
Views: 716
Reputation: 23344
Which do you think is the safest one to remove and why?
/sdk/extras/android/support/v4/android-support-v4.jar
v4 Support Library
This library is designed to be used with Android 1.6 (API level 4) and higher. It includes the largest set of APIs compared to the other libraries, including support for application components, user interface features, accessibility, data handling, network connectivity, and programming utilities. So that you will able to make your application backword compatible.
v7 Libraries
There are several libraries designed to be used with Android 2.1 (API level 7) and higher. These libraries provide specific feature sets and can be included in your application independently from each other.
v7 appcompat library
This library adds support for the Action Bar user interface design pattern.
Note:
This library depends on the v4 Support Library. If you are using Ant or Eclipse, make sure you include the v4 Support Library as part of this library's classpath.
So yes you need both jars if you want to use v7.
The following SO post illustrates the same difference-between-android-support-v7-appcompat-and-android-support-v4.
Read more about Support Library Features.
UPDATE:
To be not more confused lets elaborate the point -
So that means the v4 jar inside the v4 folder would never actually be used by any new projects that i create, no matter what min sdk i set? i.e. only the v4 jar from the v7 folder would be used always?
Upvotes: 1
Reputation: 5470
Don't remove it. V7 includes the support library and adds additional features (such as ActionBar). The entire folder will be added to any project created with Eclipse wizard that requires these features, so it needs to have android-support-v4.jar
inside.
Upvotes: 3