In case you need to add Android Support Library, such as android-support-v4.jar; Google documents suggested to:
- 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.
Home »
» Tips to add Support Library
Tips to add Support Library
Written By MR HARI on Minggu, 06 Januari 2013 | 12.10
Related Articles
If you enjoyed this article just click here, or subscribe to receive more great content just like it.


0 komentar:
Posting Komentar