I have successfully created an application in Eclipse and it works for android 4.0 and higher. Now I want to make it compatible with Android 2.3 and higher. In my application, I used the action bar, so I added the support android-v7-appcompat android library project to my workspace in my workspace. Following the instructions of http://developer.android.com/tools/support-library/setup.html , I now have android-v7-appcompat.jar and android-support-v4 support. jar'under my projects Android Private Libraries section. I also have jar files in the libs folder of my project.
In my main activity, I imported:
import android.support.v7.app.ActionBarActivity; import android.support.v7.app.ActionBar;
In the AndroidManifest.xml file, I stated:
<application android:allowBackup="true" android:theme="@style/Theme.AppCompat"
In addition, for various actions declared as:
<activity android: android:uiOptions="splitActionBarWhenNarrow"
Previously, my AndroidManifest.xml was something like this:
<application android:allowBackup="true" android:theme="@style/<theme>"
and the styles.xml file under res> values ββlooks like this:
<resources xmlns:android="http://schemas.android.com/apk/res/android"> <style name="<base>" parent="android:Theme.Light"> </style> <style name="<theme>" parent="<base>"> </style> </resources>
is used
<style name="<base>" parent="android:Theme.Holo.Light"> </style>
in the folder -V11 and
<style name="<base>" parent="android:Theme.Holo.Light.DarkActionBar"> </style>
in the values ββfolder is v14.
Now I have included all styles_base.xml and themes_base.xml files from the library project in my project. Also modified the styles.xml file, replacing Theme.
Every time I run the application, I encounter crashes, now even for versions 4.0 and later versions of Android. Message:
java.main.NoClassDefFounderError: android.support.v7.appcompat.R$styleable at android.support.v7.app.ActionBarActivityDelegate.onCreate
Please, help.