Getting this error on JellyBean:
01-11 18:26:52.030: E/AndroidRuntime(16517): FATAL EXCEPTION: main
01-11 18:26:52.030: E/AndroidRuntime(16517): java.lang.No
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.
It happened to me when I added google-play-services_lib
library project (from ASDK extras) to my IDE (IntellyJ Idea), per official google docs. The library project references google-play-services.jar
which in turn needs support-v4 jar, but this dependency is not included into google-play-services_lib
.
In the logcat there were other warning about missing support-v4 classes too.
Adding support-v4 jar manually to main application project solved the issue.
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.
Copy : https://stackoverflow.com/a/16641790/5243214