Android Error - Caused By: Java.Lang.Noclassdeffounderror: Android.Support.V4.Util.Sparsearraycompat

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



Leave a reply



Submit