3 Replies Latest reply: Aug 1, 2012 6:00 AM by Double A RSS

    Failed resolving Ltests/sync/MainAct error on MDK

    Erduran
      After installation the MDK, I've imported simple_sync_android project into eclipse and set osync_android.jar as environment variable as shown in the tutorial. But when i try to run and debug it i'm getting this error. "Failed resolving Ltests/sync/MainAct; interface 54 'Loracle/opensync/ose/OSEExceptionConstants;'" The following is the error all i have got when i try to run the project.


      05-15 05:12:29.029: I/dalvikvm(361): Failed resolving Ltests/sync/MainAct; interface 54 'Loracle/opensync/ose/OSEExceptionConstants;'
      05-15 05:12:29.029: W/dalvikvm(361): Link of class 'Ltests/sync/MainAct;' failed
      05-15 05:12:29.129: D/AndroidRuntime(361): Shutting down VM
      05-15 05:12:29.129: W/dalvikvm(361): threadid=1: thread exiting with uncaught exception (group=0x40015560)
      05-15 05:12:29.299: E/AndroidRuntime(361): FATAL EXCEPTION: main
      05-15 05:12:29.299: E/AndroidRuntime(361): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{tests.sync/tests.sync.MainAct}: java.lang.ClassNotFoundException: tests.sync.MainAct in loader dalvik.system.PathClassLoader[data/app/tests.sync-1.apk]
      05-15 05:12:29.299: E/AndroidRuntime(361):      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1569)
      05-15 05:12:29.299: E/AndroidRuntime(361):      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
      05-15 05:12:29.299: E/AndroidRuntime(361):      at android.app.ActivityThread.access$1500(ActivityThread.java:117)
      05-15 05:12:29.299: E/AndroidRuntime(361):      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
      05-15 05:12:29.299: E/AndroidRuntime(361):      at android.os.Handler.dispatchMessage(Handler.java:99)
      05-15 05:12:29.299: E/AndroidRuntime(361):      at android.os.Looper.loop(Looper.java:130)
      05-15 05:12:29.299: E/AndroidRuntime(361):      at android.app.ActivityThread.main(ActivityThread.java:3683)
      05-15 05:12:29.299: E/AndroidRuntime(361):      at java.lang.reflect.Method.invokeNative(Native Method)
      05-15 05:12:29.299: E/AndroidRuntime(361):      at java.lang.reflect.Method.invoke(Method.java:507)
      05-15 05:12:29.299: E/AndroidRuntime(361):      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
      05-15 05:12:29.299: E/AndroidRuntime(361):      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
      05-15 05:12:29.299: E/AndroidRuntime(361):      at dalvik.system.NativeStart.main(Native Method)
      05-15 05:12:29.299: E/AndroidRuntime(361): Caused by: java.lang.ClassNotFoundException: tests.sync.MainAct in loader dalvik.system.PathClassLoader[data/app/tests.sync-1.apk]
      05-15 05:12:29.299: E/AndroidRuntime(361):      at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
      05-15 05:12:29.299: E/AndroidRuntime(361):      at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
      05-15 05:12:29.299: E/AndroidRuntime(361):      at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
      05-15 05:12:29.299: E/AndroidRuntime(361):      at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
      05-15 05:12:29.299: E/AndroidRuntime(361):      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
      05-15 05:12:29.299: E/AndroidRuntime(361):      ... 11 more
      05-15 05:21:24.079: W/dalvikvm(419): VFY: unable to find class referenced in signature (Loracle/opensync/ose/OSESession;)
      05-15 05:21:24.110: E/dalvikvm(419): Could not find class 'oracle.opensync.ose.OSEException', referenced from method tests.sync.MainAct.initSess
      05-15 05:21:24.110: W/dalvikvm(419): VFY: unable to resolve new-instance 53 (Loracle/opensync/ose/OSEException;) in Ltests/sync/MainAct;
      05-15 05:21:24.119: D/dalvikvm(419): VFY: replacing opcode 0x22 at 0x0015
      05-15 05:21:24.119: W/dalvikvm(419): VFY: unable to resolve exception class 53 (Loracle/opensync/ose/OSEException;)
      05-15 05:21:24.119: W/dalvikvm(419): VFY: unable to find exception handler at addr 0x1d
      05-15 05:21:24.119: W/dalvikvm(419): VFY: rejected Ltests/sync/MainAct;.initSess (Z)V
      05-15 05:21:24.119: W/dalvikvm(419): VFY: rejecting opcode 0x0d at 0x001d
      05-15 05:21:24.119: W/dalvikvm(419): VFY: rejected Ltests/sync/MainAct;.initSess (Z)V
      05-15 05:21:24.119: W/dalvikvm(419): Verifier rejected class Ltests/sync/MainAct;
      05-15 05:21:24.140: W/dalvikvm(419): Class init failed in newInstance call (Ltests/sync/MainAct;)
      05-15 05:21:24.159: D/AndroidRuntime(419): Shutting down VM
      05-15 05:21:24.159: W/dalvikvm(419): threadid=1: thread exiting with uncaught exception (group=0x40015560)
      05-15 05:21:24.179: E/AndroidRuntime(419): FATAL EXCEPTION: main
      05-15 05:21:24.179: E/AndroidRuntime(419): java.lang.VerifyError: tests.sync.MainAct
      05-15 05:21:24.179: E/AndroidRuntime(419):      at java.lang.Class.newInstanceImpl(Native Method)
      05-15 05:21:24.179: E/AndroidRuntime(419):      at java.lang.Class.newInstance(Class.java:1409)
      05-15 05:21:24.179: E/AndroidRuntime(419):      at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
      05-15 05:21:24.179: E/AndroidRuntime(419):      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
      05-15 05:21:24.179: E/AndroidRuntime(419):      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
      05-15 05:21:24.179: E/AndroidRuntime(419):      at android.app.ActivityThread.access$1500(ActivityThread.java:117)
      05-15 05:21:24.179: E/AndroidRuntime(419):      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
      05-15 05:21:24.179: E/AndroidRuntime(419):      at android.os.Handler.dispatchMessage(Handler.java:99)
      05-15 05:21:24.179: E/AndroidRuntime(419):      at android.os.Looper.loop(Looper.java:130)
      05-15 05:21:24.179: E/AndroidRuntime(419):      at android.app.ActivityThread.main(ActivityThread.java:3683)
      05-15 05:21:24.179: E/AndroidRuntime(419):      at java.lang.reflect.Method.invokeNative(Native Method)
      05-15 05:21:24.179: E/AndroidRuntime(419):      at java.lang.reflect.Method.invoke(Method.java:507)
      05-15 05:21:24.179: E/AndroidRuntime(419):      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
      05-15 05:21:24.179: E/AndroidRuntime(419):      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
      05-15 05:21:24.179: E/AndroidRuntime(419):      at dalvik.system.NativeStart.main(Native Method)
      05-15 05:21:26.011: I/Process(419): Sending signal. PID: 419 SIG: 9

      Edited by: 934323 on May 14, 2012 10:37 PM
        • 1. Re: Failed resolving Ltests/sync/MainAct error on MDK
          934626
          In Java Build Path (eclipse) try to change the order of the mobile sync lib in the "Order and Export" tab and rebulid your project.
          • 2. Re: Failed resolving Ltests/sync/MainAct error on MDK (Solved)
            Double A
            I wasted 4-5 days trying to figure out why the simple_sync_android app does not work out of the box despite following all the instructions. This thread did help me. Specifically, I was getting a Class not Found and then a Force Close in the application. The relevant section from logcat is pasted here.

            Solution:
            1. Go to Project Properties
            2. Java Build Path
            3. Click Order and Export Tab
            4. I moved the MOBILE_SYNC_ANDROID_LIB entry

            07-31 11:46:47.204: E/AndroidRuntime(340): FATAL EXCEPTION: main
            07-31 11:46:47.204: E/AndroidRuntime(340): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{tests.sync/tests.sync.MainAct}: java.lang.ClassNotFoundException: tests.sync.MainAct in loader dalvik.system.PathClassLoader[data/app/tests.sync-2.apk]
            07-31 11:46:47.204: E/AndroidRuntime(340):      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1569)
            07-31 11:46:47.204: E/AndroidRuntime(340):      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
            07-31 11:46:47.204: E/AndroidRuntime(340):      at android.app.ActivityThread.access$1500(ActivityThread.java:117)
            07-31 11:46:47.204: E/AndroidRuntime(340):      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
            07-31 11:46:47.204: E/AndroidRuntime(340):      at android.os.Handler.dispatchMessage(Handler.java:99)
            07-31 11:46:47.204: E/AndroidRuntime(340):      at android.os.Looper.loop(Looper.java:123)
            07-31 11:46:47.204: E/AndroidRuntime(340):      at android.app.ActivityThread.main(ActivityThread.java:3683)
            07-31 11:46:47.204: E/AndroidRuntime(340):      at java.lang.reflect.Method.invokeNative(Native Method)
            07-31 11:46:47.204: E/AndroidRuntime(340):      at java.lang.reflect.Method.invoke(Method.java:507)
            07-31 11:46:47.204: E/AndroidRuntime(340):      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
            07-31 11:46:47.204: E/AndroidRuntime(340):      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
            07-31 11:46:47.204: E/AndroidRuntime(340):      at dalvik.system.NativeStart.main(Native Method)
            07-31 11:46:47.204: E/AndroidRuntime(340): Caused by: java.lang.ClassNotFoundException: tests.sync.MainAct in loader dalvik.system.PathClassLoader[data/app/tests.sync-2.apk]
            07-31 11:46:47.204: E/AndroidRuntime(340):      at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
            07-31 11:46:47.204: E/AndroidRuntime(340):      at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
            07-31 11:46:47.204: E/AndroidRuntime(340):      at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
            07-31 11:46:47.204: E/AndroidRuntime(340):      at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
            07-31 11:46:47.204: E/AndroidRuntime(340):      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
            • 3. Re: Failed resolving Ltests/sync/MainAct error on MDK (solved)
              Double A
              I wasted 4-5 days trying to figure out why the simple_sync_android app does not work out of the box despite following all the instructions. This thread did help me. Specifically, I was getting a Class not Found and then a Force Close in the application. The relevant section from logcat is pasted here.

              Solution:
              1. Go to Project Properties
              2. Java Build Path
              3. Click Order and Export Tab
              4. I moved the MOBILE_SYNC_ANDROID_LIB entry to second line (just below simple_sync_android/src) and it worked

              07-31 11:46:47.204: E/AndroidRuntime(340): FATAL EXCEPTION: main
              07-31 11:46:47.204: E/AndroidRuntime(340): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{tests.sync/tests.sync.MainAct}: java.lang.ClassNotFoundException: tests.sync.MainAct in loader dalvik.system.PathClassLoader[data/app/tests.sync-2.apk]
              07-31 11:46:47.204: E/AndroidRuntime(340):      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1569)
              07-31 11:46:47.204: E/AndroidRuntime(340):      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
              07-31 11:46:47.204: E/AndroidRuntime(340):      at android.app.ActivityThread.access$1500(ActivityThread.java:117)
              07-31 11:46:47.204: E/AndroidRuntime(340):      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
              07-31 11:46:47.204: E/AndroidRuntime(340):      at android.os.Handler.dispatchMessage(Handler.java:99)
              07-31 11:46:47.204: E/AndroidRuntime(340):      at android.os.Looper.loop(Looper.java:123)
              07-31 11:46:47.204: E/AndroidRuntime(340):      at android.app.ActivityThread.main(ActivityThread.java:3683)
              07-31 11:46:47.204: E/AndroidRuntime(340):      at java.lang.reflect.Method.invokeNative(Native Method)
              07-31 11:46:47.204: E/AndroidRuntime(340):      at java.lang.reflect.Method.invoke(Method.java:507)
              07-31 11:46:47.204: E/AndroidRuntime(340):      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
              07-31 11:46:47.204: E/AndroidRuntime(340):      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
              07-31 11:46:47.204: E/AndroidRuntime(340):      at dalvik.system.NativeStart.main(Native Method)
              07-31 11:46:47.204: E/AndroidRuntime(340): Caused by: java.lang.ClassNotFoundException: tests.sync.MainAct in loader dalvik.system.PathClassLoader[data/app/tests.sync-2.apk]
              07-31 11:46:47.204: E/AndroidRuntime(340):      at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
              07-31 11:46:47.204: E/AndroidRuntime(340):      at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
              07-31 11:46:47.204: E/AndroidRuntime(340):      at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
              07-31 11:46:47.204: E/AndroidRuntime(340):      at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
              07-31 11:46:47.204: E/AndroidRuntime(340):      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)