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.


I always get this and just restart eclipse to resolve it on MAC laptop.


While your compile version is not the same with your Minimum Required SDK Version,android will create appcompat,the appcompat created may reference it's own support-v4,and the support-v4 version may be different with the support-v7 you have used,even you have an compatible support-v4. I solved this problem just to have Minimum Required SDK version be same with compile version. Wish to help everyone.