Ext.: http://blog.csdn.net/liranke/article/details/17226083
Android projects often need to refer to custom or external jar packages, which provide some experience for reference.
I. GENERAL Practice:
1. Normally, copy the jar package directly to the Libs directory in the Eclipse project, and Eclipse will automatically refer to it, where the Red fork in the code disappears.
2. Check whether private libaries and dependencies in the order and export in Build path are checked, and the correct option is to tick.
Then clean the whole project, and then run the can.
3. Your jar file must also be created by the Android project, otherwise, "Java.lang.NoClassDefFoundError" and other errors will occur, here is an error:
12-09 00:43:05.172:E/DALVIKVM (4456): Could not find class ' com.example.test4androidjar2.Jar4Android ', referenced from Method Com.example.filemanagertest4android.mainactivity$1.onclick
4. Your jar package must be edited and compiled under Android, packaged, and not packaged in Java. Filemnager is one example.
Two. Exceptions that may be caused:
1. Could not find class ...
2. Vfy:unable to resolve New-instance 643 .....
3. Could not find class ' com.example.test4androidjar2.Jar4Android '
4. Java.lang.NoClassDefFoundError ...
Three. Workaround:
Refer to the above mentioned in "I. General practice".
How Android correctly references other jar packages (RPM)