Reputation: 27
I've already created an Android app for 4.1.2 and I want a Version for 2.2.
What I use is the class PopupMenu and there is no support in 2.2. I searched Google and found that I have to import the android-support-v7-appcompat project into Eclipse.
In my Project BuchAppZweiPunktZwei I've set this library as a reference. I also added the support-appcompat.jar to my Build-Path in the android-support-v7-appcompat project.
I get the following error:
[2014-03-22 17:10:04 - BuchAppZweiPUNKTZwei] C:\Users\Pascal\Downloads\adt-bundle-windows-x86_64-20130917\adt-bundle-windows-x86_64-20130917\sdk\extras\android\support\v7\appcompat\res\values-v14\styles_base.xml:24: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar'.
[2014-03-22 17:10:04 - BuchAppZweiPUNKTZwei] C:\Users\Pascal\Downloads\adt-bundle-windows-x86_64-20130917\adt-bundle-windows-x86_64-20130917\sdk\extras\android\support\v7\appcompat\res\values-v14\styles_base.xml:28: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar'.
[2014-03-22 17:10:04 - BuchAppZweiPUNKTZwei] C:\Users\Pascal\Downloads\adt-bundle-windows-x86_64-20130917\adt-bundle-windows-x86_64-20130917\sdk\extras\android\support\v7\appcompat\res\values-v14\styles_base.xml:32: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar.Solid'.
and so on.
Can someone tell me how to fix that?
Upvotes: 1
Views: 289
Reputation: 38252
Firstly, don't create a jar of the v7 appcompat project; simply include it as a project library to your own project.
Secondly, as per the documentation on the use of v7 appcompat:
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.
Lastly, make sure your application is using the AppCompat theme:
<application ... android:theme="@style/Theme.AppCompat">
...
</application>
Upvotes: 1