Log in or register to post comments

Error when compiling

October 9, 2010 - 2:52pm #1

Hello,

I'm giving a try to the Qualcomm SDK :)

I've followed every step and now have the two projects :
Shared and ImageTargets on my Eclipse, there is no error, but when I try to launch the app on my Nexus One (2.2), I have a force close with this :

10-09 23:46:46.981: ERROR/AndroidRuntime(1815): java.lang.UnsatisfiedLinkError: getOpenGlEsVersionNative
10-09 23:46:46.981: ERROR/AndroidRuntime(1815): at com.qualcomm.QCARSamples.ImageTargets.ImageTargets.getOpenGlEsVersionNative(Native Method)
10-09 23:46:46.981: ERROR/AndroidRuntime(1815): at com.qualcomm.QCARSamples.ImageTargets.ImageTargets.getInitializationFlags(ImageTargets.java:79)
10-09 23:46:46.981: ERROR/AndroidRuntime(1815): at com.qualcomm.QCARSamples.Shared.QCARSampleActivity.onCreate(QCARSampleActivity.java:214)
10-09 23:46:46.981: ERROR/AndroidRuntime(1815): at com.qualcomm.QCARSamples.ImageTargets.ImageTargets.onCreate(ImageTargets.java:50)

And if I try with another project (VirtualButtons) I have :
10-09 23:40:55.071: ERROR/AndroidRuntime(1747): java.lang.UnsatisfiedLinkError: onResume
10-09 23:40:55.071: ERROR/AndroidRuntime(1747): at com.qualcomm.QCAR.QCAR.onResume(Native Method)
10-09 23:40:55.071: ERROR/AndroidRuntime(1747): at com.qualcomm.QCARSamples.Shared.QCARSampleActivity.onResume(QCARSampleActivity.java:233)

Can someone help me with that ?

October 11, 2010 - 1:30am #5

Okay thanks !

That wasn't written on the Dev Guide, that's why ^^

By the way, great SDK, really good work !

October 10, 2010 - 6:19am #4

That's correct, on Mac and Linux you will need to copy the libQCAR.so files by hand (or write a shell script to replace the .bat file). Please note that if you rebuild the Shared project's native libraries using "ndk-build" you will have to recopy these files.

If you would like to disable the .bat file execution in Eclipse you can right-click on the com_qualcomm_QCARSamples_Shared project in the Package Explorer, choose Properties > Builders, and uncheck the "Import QCAR libs" builder.

Future releases of the SDK will resolve this issue.

- Kim

October 10, 2010 - 3:16am #3

Thanks for the answer !

In fact, libQCAR.so was not copied onto the Shared folder even if I had the message :
===============================================================
QCAR-SDK: libQCAR.so succesfully copied into build directories!
===============================================================
(followed by two errors while trying to open .bat files)

I think it's because i'm on MAC OSX and it tried to load .bat files

Thanks !

October 9, 2010 - 7:08pm #2

UnsatisfiedLinkErrors are caused by a missing native function. In this case, you are probably missing the entire shared library (.so file). Make sure that you run "ndk-build" in each of the sample project directories, including the Shared directory. In Eclipse, you will need to refresh each project to add the libraries to the build. Right-click on the project in the Package Explorer and choose Refresh.

When everything is set up correctly, you should see the following files in Eclipse:

com_qualcomm_QCARSamples_Shared
- libs
- - armeabi
- - - libQCAR.so
- - - libShared.so
- - armeabi-v7a
- - - libQCAR.so
- - - libShared.so

ImageTargets
- libs
- - armeabi
- - - libImageTargets.so
- - armeabi-v7a
- - - libImageTargets.so

With these files in place, the errors should go away.

- Kim

Log in or register to post comments