Log in or register to post comments

Sample application crashes on start

May 28, 2012 - 8:25pm #1

I have eclipse installed, along with everything else in the install tutorial. I imported the sample imagetracker and dominos program from the samples and did the ndk-build on each and they both crash immediately when they start on the phone. I am trying it on 3 different phones. Garmin-Asus, htc G2, htc G1 running Android 2.1, 2.3,2.2 respectively. Here is a dump from the log.

05-28 23:19:06.593: I/dalvikvm(1394): Could not find method com.qualcomm.QCAR.QCAR.requiresAlpha, referenced from method com.qualcomm.QCARSamples.Dominoes.Dominoes.initApplicationAR
05-28 23:19:06.593: W/dalvikvm(1394): VFY: unable to resolve static method 70: Lcom/qualcomm/QCAR/QCAR;.requiresAlpha ()Z
05-28 23:19:06.593: D/dalvikvm(1394): VFY: replacing opcode 0x71 at 0x000a
05-28 23:19:06.593: D/dalvikvm(1394): VFY: dead code 0x000d-004e in Lcom/qualcomm/QCARSamples/Dominoes/Dominoes;.initApplicationAR ()V
05-28 23:19:06.613: I/dalvikvm(1394): Could not find method com.qualcomm.QCAR.QCAR.isInitialized, referenced from method com.qualcomm.QCARSamples.Dominoes.Dominoes.onConfigurationChanged
05-28 23:19:06.613: W/dalvikvm(1394): VFY: unable to resolve static method 65: Lcom/qualcomm/QCAR/QCAR;.isInitialized ()Z
05-28 23:19:06.613: D/dalvikvm(1394): VFY: replacing opcode 0x71 at 0x000b
05-28 23:19:06.613: D/dalvikvm(1394): VFY: dead code 0x000e-0014 in Lcom/qualcomm/QCARSamples/Dominoes/Dominoes;.onConfigurationChanged (Landroid/content/res/Configuration;)V
05-28 23:19:06.613: I/dalvikvm(1394): Could not find method com.qualcomm.QCAR.QCAR.deinit, referenced from method com.qualcomm.QCARSamples.Dominoes.Dominoes.onDestroy
05-28 23:19:06.613: W/dalvikvm(1394): VFY: unable to resolve static method 63: Lcom/qualcomm/QCAR/QCAR;.deinit ()V
05-28 23:19:06.613: D/dalvikvm(1394): VFY: replacing opcode 0x71 at 0x0057
05-28 23:19:06.623: D/dalvikvm(1394): VFY: dead code 0x005a-005e in Lcom/qualcomm/QCARSamples/Dominoes/Dominoes;.onDestroy ()V
05-28 23:19:06.623: I/dalvikvm(1394): Could not find method com.qualcomm.QCAR.QCAR.onPause, referenced from method com.qualcomm.QCARSamples.Dominoes.Dominoes.onPause
05-28 23:19:06.623: W/dalvikvm(1394): VFY: unable to resolve static method 66: Lcom/qualcomm/QCAR/QCAR;.onPause ()V
05-28 23:19:06.623: D/dalvikvm(1394): VFY: replacing opcode 0x71 at 0x002e
05-28 23:19:06.623: D/dalvikvm(1394): VFY: dead code 0x0031-0031 in Lcom/qualcomm/QCARSamples/Dominoes/Dominoes;.onPause ()V
05-28 23:19:06.633: I/dalvikvm(1394): Could not find method com.qualcomm.QCAR.QCAR.onResume, referenced from method com.qualcomm.QCARSamples.Dominoes.Dominoes.onResume
05-28 23:19:06.633: W/dalvikvm(1394): VFY: unable to resolve static method 67: Lcom/qualcomm/QCAR/QCAR;.onResume ()V
05-28 23:19:06.633: D/dalvikvm(1394): VFY: replacing opcode 0x71 at 0x0008
05-28 23:19:06.633: D/dalvikvm(1394): VFY: dead code 0x000b-0068 in Lcom/qualcomm/QCARSamples/Dominoes/Dominoes;.onResume ()V
05-28 23:19:06.643: D/dalvikvm(1394): Trying to load lib /data/data/com.qualcomm.QCARSamples.Dominoes/lib/libQCAR.so 0x43e31cd8
05-28 23:19:06.663: D/dalvikvm(1394): Added shared lib /data/data/com.qualcomm.QCARSamples.Dominoes/lib/libQCAR.so 0x43e31cd8
05-28 23:19:06.663: W/dalvikvm(1394): Exception Ljava/lang/NoClassDefFoundError; thrown during Lcom/qualcomm/QCARSamples/Dominoes/Dominoes;.<clinit>
05-28 23:19:06.663: W/dalvikvm(1394): Class init failed in newInstance call (Lcom/qualcomm/QCARSamples/Dominoes/Dominoes;)
05-28 23:19:06.663: D/AndroidRuntime(1394): Shutting down VM
05-28 23:19:06.663: W/dalvikvm(1394): threadid=1: thread exiting with uncaught exception (group=0x400207e8)
05-28 23:19:06.693: E/AndroidRuntime(1394): FATAL EXCEPTION: main
05-28 23:19:06.693: E/AndroidRuntime(1394): java.lang.ExceptionInInitializerError
05-28 23:19:06.693: E/AndroidRuntime(1394): 	at java.lang.Class.newInstanceImpl(Native Method)
05-28 23:19:06.693: E/AndroidRuntime(1394): 	at java.lang.Class.newInstance(Class.java:1429)
05-28 23:19:06.693: E/AndroidRuntime(1394): 	at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
05-28 23:19:06.693: E/AndroidRuntime(1394): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
05-28 23:19:06.693: E/AndroidRuntime(1394): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
05-28 23:19:06.693: E/AndroidRuntime(1394): 	at android.app.ActivityThread.access$2300(ActivityThread.java:125)
05-28 23:19:06.693: E/AndroidRuntime(1394): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
05-28 23:19:06.693: E/AndroidRuntime(1394): 	at android.os.Handler.dispatchMessage(Handler.java:99)
05-28 23:19:06.693: E/AndroidRuntime(1394): 	at android.os.Looper.loop(Looper.java:123)
05-28 23:19:06.693: E/AndroidRuntime(1394): 	at android.app.ActivityThread.main(ActivityThread.java:4627)
05-28 23:19:06.693: E/AndroidRuntime(1394): 	at java.lang.reflect.Method.invokeNative(Native Method)
05-28 23:19:06.693: E/AndroidRuntime(1394): 	at java.lang.reflect.Method.invoke(Method.java:521)
05-28 23:19:06.693: E/AndroidRuntime(1394): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
05-28 23:19:06.693: E/AndroidRuntime(1394): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
05-28 23:19:06.693: E/AndroidRuntime(1394): 	at dalvik.system.NativeStart.main(Native Method)
05-28 23:19:06.693: E/AndroidRuntime(1394): Caused by: java.lang.NoClassDefFoundError: com.qualcomm.ar.pl.CameraPreview
05-28 23:19:06.693: E/AndroidRuntime(1394): 	at java.lang.Runtime.nativeLoad(Native Method)
05-28 23:19:06.693: E/AndroidRuntime(1394): 	at java.lang.Runtime.loadLibrary(Runtime.java:448)
05-28 23:19:06.693: E/AndroidRuntime(1394): 	at java.lang.System.loadLibrary(System.java:557)
05-28 23:19:06.693: E/AndroidRuntime(1394): 	at com.qualcomm.QCARSamples.Dominoes.Dominoes.loadLibrary(Dominoes.java:796)
05-28 23:19:06.693: E/AndroidRuntime(1394): 	at com.qualcomm.QCARSamples.Dominoes.Dominoes.<clinit>(Dominoes.java:107)
05-28 23:19:06.693: E/AndroidRuntime(1394): 	... 15 more
05-28 23:19:06.693: E/AndroidRuntime(1394): Caused by: java.lang.ClassNotFoundException: com.qualcomm.ar.pl.CameraPreview in loader dalvik.system.PathClassLoader[/data/app/com.qualcomm.QCARSamples.Dominoes-1.apk]
05-28 23:19:06.693: E/AndroidRuntime(1394): 	at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
05-28 23:19:06.693: E/AndroidRuntime(1394): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
05-28 23:19:06.693: E/AndroidRuntime(1394): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
05-28 23:19:06.693: E/AndroidRuntime(1394): 	... 20 more

Re: Sample application crashes on start

May 30, 2012 - 2:47pm #3
ppreuss wrote:

Hello fnsnoop,

Please make sure you QCAR_SDK_ROOT is checked in the "Order and Export" tab of your project "Java Build Path". This can be found by right clicking on your project and selecting "Properties". From the properties window select "Java Build Path" on the left. In the "Java Build Path" window select the "Order and Export" tab and make sure QCAR_SDK_ROOT is checked.

Thank you,

-Peter

Nevermind, cleaning the project after your suggestions helped. Thanks

Re: Sample application crashes on start

May 29, 2012 - 11:56am #2

Hello fnsnoop,

Please make sure you QCAR_SDK_ROOT is checked in the "Order and Export" tab of your project "Java Build Path". This can be found by right clicking on your project and selecting "Properties". From the properties window select "Java Build Path" on the left. In the "Java Build Path" window select the "Order and Export" tab and make sure QCAR_SDK_ROOT is checked.

Thank you,

-Peter

Log in or register to post comments