I'm building a library project in which I'm using 3rd party jar file.
Normally when I use the library as a dependency on TestApp all things works as it should. Attached is the screenshot for that:
But, when I export jar from the TestSDK
library project and add it to the build path of the TestApp
, which looks like this:
I get VerifyError
when deploying the app on device. Below are the logs for it:
12-30 18:10:55.778: W/dalvikvm(7316): VFY: unable to find class referenced in signature (Lcom/aerserv/sdk/ASAdView;)
12-30 18:10:55.788: W/dalvikvm(7316): VFY: Ljava/lang/Object; is not instance of Landroid/view/View;
12-30 18:10:55.788: W/dalvikvm(7316): VFY: bad arg 1 (into Landroid/view/View;)
12-30 18:10:55.788: W/dalvikvm(7316): VFY: rejecting call to Landroid/view/ViewGroup;.removeView (Landroid/view/View;)V
12-30 18:10:55.788: W/dalvikvm(7316): VFY: rejecting opcode 0x6e at 0x0011
12-30 18:10:55.788: W/dalvikvm(7316): VFY: rejected Lcom/anupam/sdk/activities/AdsActivity;.initAerservAd ()V
12-30 18:10:55.788: W/dalvikvm(7316): Verifier rejected class Lcom/anupam/sdk/activities/AdsActivity;
12-30 18:10:55.788: W/dalvikvm(7316): Class init failed in newInstance call (Lcom/anupam/sdk/activities/AdsActivity;)
12-30 18:10:55.788: D/AndroidRuntime(7316): Shutting down VM
12-30 18:10:55.788: W/dalvikvm(7316): threadid=1: thread exiting with uncaught exception (group=0x41596ba8)
12-30 18:10:55.788: E/AndroidRuntime(7316): FATAL EXCEPTION: main
12-30 18:10:55.788: E/AndroidRuntime(7316): Process: com.anupam.testsdk, PID: 7316
12-30 18:10:55.788: E/AndroidRuntime(7316): java.lang.VerifyError: com/anupam/sdk/activities/AdsActivity
What should be the correct way to do that? Am I missing something here. Any kind of help or guidance will be much appreciated.