NoClassDefFoundError: android.support.v4.util.ArrayMap
Frequently, a problem regarding a missing android.support
class means that you have an older version of the affected library, one from before the class in question was added. Unfortunately, the JavaDocs do a poor job of indicating which version of the support libraries added newer classes.
If you are using Android Studio, make sure that your support-
dependencies are fairly recent, and that your compileSdkVersion
matches the major version number of the dependency.
If you are using Eclipse, you will have to not only download the latest libraries from the SDK Manager, but then remove the old library from your Eclipse project and add in an up-to-date copy of the library from your SDK installation.
java.lang.NoClassDefFoundError: Android Compatability Issue in 2.2
getFragmentManager was only added in API11 (http://developer.android.com/reference/android/app/Fragment.html#getFragmentManager()) You should change the code to use getSupportFragmentManager(). You can find more information about the api of android-support-v4.jar here(http://developer.android.com/reference/android/support/v4/app/Fragment.html).
You need to use android-support-v4.jar to support fragments in android 2.2
Android error - Caused by: java.lang.NoClassDefFoundError: android.support.v4.util.SparseArrayCompat
Right Click on your project -> Build Path -> Configure Build Path -> Order and Export Tab.
Make sure that "Android Private Libraries" is checked for Export.
If you've added any libraries from the libs/ folder, remove them as they are automatically added in the "Android Private Libraries" section.
WearableListView ClassNotFoundException Support v4 ArrayMap
I saw this java.lang.ClassNotFoundException: android.support.v4.util.ArrayMap
in your logcat trace. And I think maybe the version of your v4
and v7
cause this error. Is your support library of v4
and v7
is up to date? And BTW, ArrayMap
only could be used for Android API 21+
Android java.lang.NoClassDefFoundError
Did you recently updated your eclipse android plugin (adt r17)? Then the following link might help:
How to fix the classdefnotfounderror with adt-17
Update: One year has passed since the question arose. I will keep the link, because even in 2013 it seem to help some people to solve the problem. But please take care what you are doing, see Erics comment below.
Current ADT-Version is 22, I recommend using the most current version.
Related Topics
Uploading Image from Android to Gcs
How to Get the Date from the Datepicker Widget in Android
Listview with Choice_Mode_Multiple Using Checkedtext in a Custom View
Send Request Over Wifi (Without Connection) Even If Mobile Data Is on (With Connection) on Android M
How to Change Actionmode Background Color in Android
Android Support Library Error After Updating to 23.3.0
Switching Between Fragment View
Add an Array of Buttons to a Gridview in an Android Application
Edittext Settext Not Working with Fragment
Camera in Android, How to Get Best Size, Preview Size, Picture Size, View Size, Image Distorted
Android Gcm (Push Notification): Device Doesn't Receive Notification If Application Is Stopped
How to Create a New Avd in Eclipse
Flutter - How to Pass Custom Arguments in Firebase Dynamic Links for App Invite Feature
How to Create Datepicker and Timepicker Dialogs in Fragment Class
Android Sp VS Dp Texts - What Would Adjust the 'Scale' and What Is the Philosophy of Support