I am trying to implement the new ActionBar support library that was released by Google a couple days ago. In the past, I have successfully implemented ActionBarSherlock wit
My issue resolve via following Steps
File->Import (android-sdk\extras\android\support\v7\appcompat)
Right Click Project-> properties->Android. In the section library "Add" and choose library appcompat that's include in step 1
Delete all files from project's libs directory
add following file to project's libs directory <SDK-PATH>\extras\android\support\v13android-support-v13.jar
Restart Eclipse if required. That's it. Your problem should be disappeared.
It happened to me when Eclipse(Luna)/AndroidSDK(not Android Stduio) were used with the latest tools and library as of Jan. 14, 2015 during the project like HelloWorld. When I installed those tools and made HelloWorld the first app, I accepted all the defaults. - This is the problem in my case.
First, check whether or not the "Android Support Library" library is installed. If not, install it. It is not installed by default. You may do it all in "Android SDK manager" available in the menu.
(Android SDK Manager -> Extra -> Android Support Library)
Blessings, (a debtor)<><
The accepted solution used to work for me once, but not now. I had to re-create a hello-world of the same kind (!) in a new workspace, made it compile, and then copied all directories, including .hg
and .hgignore
.
hg diff
shows:
- android:targetSdkVersion="19" />
+ android:targetSdkVersion="21" />
Binary file libs/android-support-v4.jar has changed
It looks like Eclipse wants to compile for API 21 and fails to do anything with API 19. Darkly.
Its bit late but here is how I get it done in AndroidStudio !
Right click on app to goto properties
Go to Dependencies and click on '+' sign and choose library dependency Choose appcompat-v7
1. Run Android SDK Manager and install the latest SDK and Android Support Libarary. The version of SDK and Android Support Libarary should be the same! 23 in my case. Another variants will give you the errors.
2. Change SDK version of your IDEA project to the last one you installed in previous step. (ps. you may not use Maven).
3. Add new Module from existing sourse to your IDEA project.
4. Add AppCompat project. !!! Should be under the last SDK too! (ps. Say "Yes" anywhere in process of this step)
5. Open settings of your main Project Module and add to it next 3 dependecies:
5.1. Module Dependency. Chose android-support-v7-appcompat
5.2. 2 pc. Library Dependencies. Add android-sdk\extras\android\support\v7\appcompat\libs\android-support-v4.jar and android-support-v4\android-support-v7-appcompat.jar
In total it will be:
6. Very important!!!
Add theme with prefix @style (not another!).
1. Run Android SDK Manager and install the latest SDK and Android Support Libarary. The version of SDK and Android Support Libarary should be the same! 23 in my case. Another variants will give you the errors.
2. Add next to build.gradle
dependencies {
compile 'com.android.support:appcompat-v7:23.0.1'
}
P.S. If you are new in Android developing, I strongly recomend you move to Android Studio & Gradle right now - you will get the simplest way of managing your android app.
works:
<style name="MyApp" parent="Theme.AppCompat.Light">
</style>
<style name="MyApp" parent="@style/Theme.AppCompat.Light">
</style>
<style name="Theme.AppCompat.Light.MyApp">
</style>