"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Samples Crash

I cant get the samples to run on my device.I'm trying the image targets sample.I ran NDK build command and got a libs folder with

 subfolders.

Fired up eclipse > File > New Project > Android > From existing source.

Cleaned and refreshed and it doesnt show any errors.The QCAR_SDK_ROOT variable also exists.However,when I run the application on my connected device ,screen goes black for a sec and then a message pops up saying the process has stopped unexpectedly and it force closes.

 

My Device - Samsung Galaxy Royal

Error Log

 

 E/AndroidRuntime(2497): FATAL EXCEPTION: main E/AndroidRuntime(2497): java.lang.ExceptionInInitializerError E/AndroidRuntime(2497):     at java.lang.Class.newInstanceImpl(Native Method) E/AndroidRuntime(2497):     at java.lang.Class.newInstance(Class.java:1409) E/AndroidRuntime(2497):     at android.app.Instrumentation.newActivity(Instrumentation.java:1021) E/AndroidRuntime(2497):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1565) E/AndroidRuntime(2497):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667) E/AndroidRuntime(2497):     at android.app.ActivityThread.access$1500(ActivityThread.java:117) E/AndroidRuntime(2497):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935) E/AndroidRuntime(2497):     at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime(2497):     at android.os.Looper.loop(Looper.java:130) E/AndroidRuntime(2497):     at android.app.ActivityThread.main(ActivityThread.java:3691) E/AndroidRuntime(2497):     at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime(2497):     at java.lang.reflect.Method.invoke(Method.java:507) E/AndroidRuntime(2497):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907) E/AndroidRuntime(2497):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665) E/AndroidRuntime(2497):     at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime(2497): Caused by: java.lang.NoClassDefFoundError: com.qualcomm.ar.pl.CameraPreview E/AndroidRuntime(2497):     at java.lang.Runtime.nativeLoad(Native Method) E/AndroidRuntime(2497):     at java.lang.Runtime.loadLibrary(Runtime.java:432) E/AndroidRuntime(2497):     at java.lang.System.loadLibrary(System.java:554) E/AndroidRuntime(2497):     at com.qualcomm.QCARSamples.ImageTargets.ImageTargets.loadLibrary(ImageTargets.java:801) E/AndroidRuntime(2497):     at com.qualcomm.QCARSamples.ImageTargets.ImageTargets.<clinit>(ImageTargets.java:107) E/AndroidRuntime(2497):     ... 15 more E/AndroidRuntime(2497): Caused by: java.lang.ClassNotFoundException: com.qualcomm.ar.pl.CameraPreview in loader dalvik.system.PathClassLoader[/data/app/com.qualcomm.QCARSamples.ImageTargets-2.apk] E/AndroidRuntime(2497):     at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240) E/AndroidRuntime(2497):     at java.lang.ClassLoader.loadClass(ClassLoader.java:551) E/AndroidRuntime(2497):     at java.lang.ClassLoader.loadClass(ClassLoader.java:511) E/AndroidRuntime(2497):     ... 20 more

A week ago ,I did get this sample to run but was facing problems with other samples.Then something weird happened.The SFK manager wouldnt show my installed android sdks.I'd 2.3.3 and 4.0 installed and it wouldnt show them!So I've reinstalled eclipse (a different version) and android SDK but now I cant even get this to work.

 

Any help will be appreciated.

Thank you.

DavidBeard

Fri, 06/22/2012 - 19:36

Have you confirmed that the libQCAR and libImageTargets *.so files are actually in the armeabi folders under libs? - that it's not an empty folder.

Also have you been able to restore your Eclipse environment for Android, or was this built from the corrupted environment?

[quote=DavidBeard]

Have you confirmed that the libQCAR and libImageTargets *.so files are actually in the armeabi folders under libs? - that it's not an empty folder.

Alright I've got the samples to work.All of them ! Laughing

 

I had the exact same issue. Solved it by checking the QCAR.jar under Project Properties->Java Build Path-> Order and Export tab (it was unchecked by default). This makes sure the QCAR.jar classes are compiled into your APK.

I to got error on the sample project :(

http://www.facebook.com/photo.php?fbid=4021103964788&set=a.1406682365882.2053459.1197091335&type=3

 

if any one can help, please...
I have done all step in the vuforia web...

 

 

DavidBeard

Thu, 09/06/2012 - 16:17

That link is giving a 'content not available' message.

Which sample, and what's the error?

Be sure to run ndk-build from the command line in the sample's base directory.

[quote=matthijs]

I had the exact same issue. Solved it by checking the QCAR.jar under Project Properties->Java Build Path-> Order and Export tab (it was unchecked by default). This makes sure the QCAR.jar classes are compiled into your APK.

[/quote]