- In Eclipse Select Project > Properties, select Java Build Path, and navigate to Libraries.
- Select Add External Jars, include the following jar files, and click OK: <android-sdk-folder>/extras/android/compatibility/v4/android-support-v4.jar
But...I found that it is not always work, even always NOT work!
No error when you compile your code, but fail with error "Caused by: java.lang.NoClassDefFoundError: youractivity" at runtime.
My alternatively, Right click your project, select Android Tools > Add Support Library...
----------
Here is another solution advised by Stefan de Bruijn in comments:
- create a folder called "libs", NOT "lib".
- copy the required jar in "libs" folder.
- Update Java Build Path by selecting "Add JARs..." (NOT "Add External JARs...") to add the jar in libs.
- like this: java.lang.NoClassDefFoundError: com.google.ads.AdView.
![Tips to add Support Library thumbnail](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia8WpQh20n9xVWZuHjxWT1QEHQzvQnBRUm8ZWMz7qtzE0IbA3JPoV6VIbW9AeVllQxn98ADFQVH5ADeIYmuV3wCyYafzACgbqIiZ0FiQtkteGLSLALSMDptobO4iY3kL8oXxVyyUojGwY/s72-c/AddSupportLibrary.png)
Title: Tips to add Support Library
Rating: 100% based on 99998 ratings. 10 user reviews.
Post by 12:10 PM
Rating: 100% based on 99998 ratings. 10 user reviews.
Post by 12:10 PM
0 comments:
Post a Comment