Log in or register to post comments

Errors when launching ndk-build

October 29, 2010 - 6:53am #5

Hi,

I have followed all the help to install all what I need to try the QCAR samples but I always have the same error when I launch ndk-build.

I tried samples provide with the ndk and it all work without problem.

I'm running on :
- MAX OS X
- Eclipse 3.6
- Nexus One

And my problem appears when I execute ndk-build on one of the samples (I put it on red) :


/Volumes/Shared/Computer/AndroidDev/qcar-sdk-0-9-7/samples/ImageTargets $ ndk-build -B
Invalid attribute name:
package

Compile++ arm : ImageTargets SharedLibrary : libImageTargets.so
Install : libImageTargets.so => /Volumes/Shared/Computer/AndroidDev/qcar-sdk-0-9-7/samples/ImageTargets/libs/armeabi
Compile++ arm : ImageTargets SharedLibrary : libImageTargets.so
Install : libImageTargets.so => /Volumes/Shared/Computer/AndroidDev/qcar-sdk-0-9-7/samples/ImageTargets/libs/armeabi-v7a

However the command seems to work for the Shared Project :


/Volumes/Shared/Computer/AndroidDev/qcar-sdk-0-9-7/samples/Shared $ ndk-build -B
Compile++ arm : Shared Compile++ arm : Shared Compile++ arm : Shared SharedLibrary : libShared.so
Install : libShared.so => /Volumes/Shared/Computer/AndroidDev/qcar-sdk-0-9-7/samples/Shared/libs/armeabi
Compile++ arm : Shared Compile++ arm : Shared Compile++ arm : Shared SharedLibrary : libShared.so
Install : libShared.so => /Volumes/Shared/Computer/AndroidDev/qcar-sdk-0-9-7/samples/Shared/libs/armeabi-v7a

As I said, there is no error when I use ndk-build for other ndk samples. It appears only for QCAR samples. It show the message "Invalid attribute name: package" and don't build all the project.

Thanks for your help.

Re: Errors when launching ndk-build

October 29, 2010 - 10:52am #4

Thanks for the bug report, I am able to reproduce the problem on our end.

You should still be able to run the sample applications despite this output. From your post, it looks like the shared libraries are being properly compiled and installed in the correct folders. Have you had any issues actually running the sample applications?

If so, be sure to refresh the projects in Eclipse after running ndk-build. Right-click on the ImageTargets project in the Package Explorer and choose Refresh.

- Kim

Re: Errors when launching ndk-build

October 30, 2010 - 2:05am #3

Yes the shared library is properly build and link to the other sample project in Eclipse.

When I try to launch a sample, it builds without problem but creates a FATAL EXCEPTION in the main :

java.lang.UnsatisfiedLinkError : getOpenGlEsVersionNative

I think this exception appears because the project can't find the jni files that should be createad with the ndk-build.

Re: Errors when launching ndk-build

October 30, 2010 - 5:30am #2

Take a look at this thread:

http://ar.qualcomm.at/node/2000020

After running ndk-build in the ImageTargets project, try cleaning and rebuilding the Eclipse project. Check to see if the file structure in Eclipse matches the structure listed in that thread. It sounds like you're missing the libImageTargets.so file.

- Kim

Re: Errors when launching ndk-build

November 3, 2010 - 3:55am #1

Perfect that was the problem !

I needed to copy manually the file libShared.so in the folder Shared/libs/armeabi and Shared/libs/armeabi-v7a

I had a look in the forum but didn't find the answer.

Thanks a lot !

Log in or register to post comments