Note that there are some explanatory texts on larger screens.

plurals
  1. POjava.lang.VerifyError for AIDL Service
    text
    copied!<p>I'm working on getting an app communicating with an external service in another application (called CSipSimple). I'm able to bind to the service:</p> <pre><code>ServiceConnection mConnection = new ServiceConnection(){ @Override public void onServiceConnected(ComponentName comp, IBinder svc){ ISipService mSvc = ISipService.Stub.asInterface(svc); // Exception here ... } ... } Intent i = new Intent("com.csipsimple.service.SipService"); getApplicationContext().bindService(i, mConnection, BIND_IMPORTANT) </code></pre> <p>The exception is thrown on the indicated line. I've searched around and tried all of the following, to no avail:</p> <ul> <li>Adding the AIDL files to the source folder of the project</li> <li>Adding the other application (CSipSimple) as a required project</li> <li>Check off all of the entries in the Order/Export list</li> <li>Cleaning and rebuilding both applications</li> </ul> <p>The following errors are generated:</p> <pre><code>06-04 12:01:25.320: W/dalvikvm(8631): VFY: unable to resolve virtual method 4276: Lcom/csipsimple/api/SipCallSession;.writeToParcel (Landroid/os/Parcel;I)V 06-04 12:01:25.320: W/dalvikvm(8631): VFY: unable to find class referenced in signature ([Lcom/csipsimple/api/SipCallSession;) 06-04 12:01:25.320: W/dalvikvm(8631): VFY: [Ljava/lang/Object; is not instance of [Landroid/os/Parcelable; 06-04 12:01:25.320: W/dalvikvm(8631): VFY: bad arg 1 (into [Landroid/os/Parcelable;) 06-04 12:01:25.320: W/dalvikvm(8631): VFY: rejecting call to Landroid/os/Parcel;.writeTypedArray ([Landroid/os/Parcelable;I)V 06-04 12:01:25.320: W/dalvikvm(8631): VFY: rejecting opcode 0x6e at 0x01dc 06-04 12:01:25.320: W/dalvikvm(8631): VFY: rejected Lcom/csipsimple/api/ISipService$Stub;.onTransact (ILandroid/os/Parcel;Landroid/os/Parcel;I)Z 06-04 12:01:25.320: W/dalvikvm(8631): Verifier rejected class Lcom/csipsimple/api/ISipService$Stub; 06-04 12:01:25.320: W/dalvikvm(8631): threadid=1: thread exiting with uncaught exception (group=0x4191d930) 06-04 12:01:25.328: E/AndroidRuntime(8631): FATAL EXCEPTION: main 06-04 12:01:25.328: E/AndroidRuntime(8631): java.lang.VerifyError: com/csipsimple/api/ISipService$Stub 06-04 12:01:25.328: E/AndroidRuntime(8631): at com.example.sipgather.MainActivity$1.onServiceConnected(MainActivity.java:37) 06-04 12:01:25.328: E/AndroidRuntime(8631): at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1101) 06-04 12:01:25.328: E/AndroidRuntime(8631): at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1118) 06-04 12:01:25.328: E/AndroidRuntime(8631): at android.os.Handler.handleCallback(Handler.java:725) 06-04 12:01:25.328: E/AndroidRuntime(8631): at android.os.Handler.dispatchMessage(Handler.java:92) 06-04 12:01:25.328: E/AndroidRuntime(8631): at android.os.Looper.loop(Looper.java:137) 06-04 12:01:25.328: E/AndroidRuntime(8631): at android.app.ActivityThread.main(ActivityThread.java:5041) 06-04 12:01:25.328: E/AndroidRuntime(8631): at java.lang.reflect.Method.invokeNative(Native Method) 06-04 12:01:25.328: E/AndroidRuntime(8631): at java.lang.reflect.Method.invoke(Method.java:511) 06-04 12:01:25.328: E/AndroidRuntime(8631): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 06-04 12:01:25.328: E/AndroidRuntime(8631): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 06-04 12:01:25.328: E/AndroidRuntime(8631): at dalvik.system.NativeStart.main(Native Method) </code></pre> <p>It looks like it can't find some of the required classes/methods, but I've added all of the AIDL files to my project. Any help would be greatly appreciated!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload