Log in or register to post comments

Can't run Dominoes sample (QCAR 1.0.0)

May 5, 2011 - 3:23am #1

Hi

I have problems running the Dominoes sample from QCAR 1.0.0.

ndk-build works fine:

Quote:

$ cd /cygdrive/c/android/qcar-sdk-1-0-0/samples/Dominoes/

$ ndk-build
Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver
Gdbsetup : libs/armeabi/gdb.setup
Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi-v7a/gdbserver
Gdbsetup : libs/armeabi-v7a/gdb.setup
Compile++ arm : Dominoes Compile++ arm : Dominoes Compile++ arm : Dominoes Compile++ arm : Dominoes Compile++ arm : Dominoes StaticLibrary : libstdc++.a
Prebuilt : libQCAR.so SharedLibrary : libDominoes.so
Install : libDominoes.so => libs/armeabi/libDominoes.so
Install : libQCAR.so => libs/armeabi/libQCAR.so
Compile++ arm : Dominoes Compile++ arm : Dominoes Compile++ arm : Dominoes Compile++ arm : Dominoes Compile++ arm : Dominoes StaticLibrary : libstdc++.a
Prebuilt : libQCAR.so SharedLibrary : libDominoes.so
Install : libDominoes.so => libs/armeabi-v7a/libDominoes.so
Install : libQCAR.so => libs/armeabi-v7a/libQCAR.so

But when I try to run it on my phone (HTC Desire with Android 2.2) from Eclipse it crashes:

Quote:

05-05 11:56:00.562: ERROR/AndroidRuntime(30700): FATAL EXCEPTION: AsyncTask #1
05-05 11:56:00.562: ERROR/AndroidRuntime(30700): java.lang.RuntimeException: An error occured while executing doInBackground()
05-05 11:56:00.562: ERROR/AndroidRuntime(30700): at android.os.AsyncTask$3.done(AsyncTask.java:200)
05-05 11:56:00.562: ERROR/AndroidRuntime(30700): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
05-05 11:56:00.562: ERROR/AndroidRuntime(30700): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
05-05 11:56:00.562: ERROR/AndroidRuntime(30700): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
05-05 11:56:00.562: ERROR/AndroidRuntime(30700): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
05-05 11:56:00.562: ERROR/AndroidRuntime(30700): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
05-05 11:56:00.562: ERROR/AndroidRuntime(30700): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
05-05 11:56:00.562: ERROR/AndroidRuntime(30700): at java.lang.Thread.run(Thread.java:1102)
05-05 11:56:00.562: ERROR/AndroidRuntime(30700): Caused by: java.lang.NoClassDefFoundError: com.qualcomm.QCAR.BackgroundSurfaceManager
05-05 11:56:00.562: ERROR/AndroidRuntime(30700): at com.qualcomm.QCAR.QCAR.privateInit(Native Method)
05-05 11:56:00.562: ERROR/AndroidRuntime(30700): at com.qualcomm.QCAR.QCAR.setInitParameters(QCAR.java:32)
05-05 11:56:00.562: ERROR/AndroidRuntime(30700): at com.qualcomm.QCARSamples.Dominoes.Dominoes$InitQCARTask.doInBackground(Dominoes.java:108)
05-05 11:56:00.562: ERROR/AndroidRuntime(30700): at com.qualcomm.QCARSamples.Dominoes.Dominoes$InitQCARTask.doInBackground(Dominoes.java:1)
05-05 11:56:00.562: ERROR/AndroidRuntime(30700): at android.os.AsyncTask$2.call(AsyncTask.java:185)
05-05 11:56:00.562: ERROR/AndroidRuntime(30700): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
05-05 11:56:00.562: ERROR/AndroidRuntime(30700): ... 4 more
05-05 11:56:00.562: ERROR/AndroidRuntime(30700): Caused by: java.lang.NoClassDefFoundError: com.qualcomm.QCAR.BackgroundSurfaceManager
05-05 11:56:00.562: ERROR/AndroidRuntime(30700): ... 10 more
05-05 11:56:00.562: ERROR/AndroidRuntime(30700): Caused by: java.lang.NoSuchMethodError: setParameters
05-05 11:56:00.562: ERROR/AndroidRuntime(30700): ... 10 more

Full debug output can be found at http://pastie.org/1867432

The VirtualButtons sample from 1.0.0 works fine and the Dominoes sample from 0.10.0 also works fine.

Re: Can't run Dominoes sample (QCAR 1.0.0)

May 5, 2011 - 4:45am #2

It looks like it isn't finding QCAR.jar. Make sure you have set the QCAR_SDK_ROOT classpath variable in Eclipse. Then look at the Java Build Path in your project properties and make sure QCAR_SDK_ROOT/build/java/QCAR/QCAR.jar is there.

Then try Cleaning your project (Project > Clean) and rebuilding.

- Kim

Log in or register to post comments