Log in or register to post comments

I can't run ImageTargets

January 27, 2011 - 4:19am #1

Hello , I am tried on qcar-sdk-0-10-0 and ndk-r5
AMD Athlon 64 Processor,Windows XP, Eclipse Helios and CDT 7.0.1

It shows this message on myConsole:
[2011-01-27 20:08:24 - ImageTargets] Android Launch!
[2011-01-27 20:08:24 - ImageTargets] adb is running normally.
[2011-01-27 20:08:24 - ImageTargets] Performing com.qualcomm.QCARSamples.ImageTargets.ImageTargets activity launch
[2011-01-27 20:08:26 - ImageTargets] Application already deployed. No need to reinstall.
[2011-01-27 20:08:26 - ImageTargets] Starting activity com.qualcomm.QCARSamples.ImageTargets.ImageTargets on device 0000003458770730
[2011-01-27 20:08:26 - ImageTargets] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.qualcomm.QCARSamples.ImageTargets/.ImageTargets }

And show this on my LogCat:
01-26 18:36:37.019: ERROR/ApplicationContext(124): Couldn't create directory for SharedPreferences file shared_prefs/searchable_locale_recorder.xml
01-26 18:36:37.549: ERROR/AndroidRuntime(5112): ERROR: thread attach failed
01-26 18:36:37.699: ERROR/ApplicationContext(124): Couldn't create directory for SharedPreferences file shared_prefs/searchable_locale_recorder.xml
01-26 18:36:38.239: ERROR/QCAR(5119): The library libImageTargets.so could not be loaded
01-26 18:36:39.099: ERROR/AndroidRuntime(5119): Uncaught handler: thread main exiting due to uncaught exception
01-26 18:36:39.129: ERROR/AndroidRuntime(5119): java.lang.UnsatisfiedLinkError: getOpenGlEsVersionNative
01-26 18:36:39.129: ERROR/AndroidRuntime(5119): at com.qualcomm.QCARSamples.ImageTargets.ImageTargets.getOpenGlEsVersionNative(Native Method)
01-26 18:36:39.129: ERROR/AndroidRuntime(5119): at com.qualcomm.QCARSamples.ImageTargets.ImageTargets.getInitializationFlags(ImageTargets.java:274)
01-26 18:36:39.129: ERROR/AndroidRuntime(5119): at com.qualcomm.QCARSamples.ImageTargets.ImageTargets.onCreate(ImageTargets.java:250)
01-26 18:36:39.129: ERROR/AndroidRuntime(5119): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
01-26 18:36:39.129: ERROR/AndroidRuntime(5119): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
01-26 18:36:39.129: ERROR/AndroidRuntime(5119): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
01-26 18:36:39.129: ERROR/AndroidRuntime(5119): at android.app.ActivityThread.access$2200(ActivityThread.java:119)
01-26 18:36:39.129: ERROR/AndroidRuntime(5119): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
01-26 18:36:39.129: ERROR/AndroidRuntime(5119): at android.os.Handler.dispatchMessage(Handler.java:99)
01-26 18:36:39.129: ERROR/AndroidRuntime(5119): at android.os.Looper.loop(Looper.java:123)
01-26 18:36:39.129: ERROR/AndroidRuntime(5119): at android.app.ActivityThread.main(ActivityThread.java:4363)
01-26 18:36:39.129: ERROR/AndroidRuntime(5119): at java.lang.reflect.Method.invokeNative(Native Method)
01-26 18:36:39.129: ERROR/AndroidRuntime(5119): at java.lang.reflect.Method.invoke(Method.java:521)
01-26 18:36:39.129: ERROR/AndroidRuntime(5119): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
01-26 18:36:39.129: ERROR/AndroidRuntime(5119): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
01-26 18:36:39.129: ERROR/AndroidRuntime(5119): at dalvik.system.NativeStart.main(Native Method)

It can drive on my phone(Nexus One) ,but It have problem.
My phone hava a QCARIcon ,but touch it, It show this have problem can't run .

If somebody can help me, I would really appreciate it

Re: I can't run ImageTargets

May 14, 2011 - 2:12am #14

Thank ksiva for the help.

It's work now.

Re: I can't run ImageTargets

May 4, 2011 - 9:06am #13

I got it solve by Kim's Suggestion. Just simple re-download and install Android NDK.

Thanks a ton Kim.

Re: I can't run ImageTargets

May 4, 2011 - 6:23am #12

Yes I can, I can build all the samples under Android-ndk but none under qcar-sdk-1-0-0.

I'll reinstall the android platform and update back to share if I can get it solved.

Re: I can't run ImageTargets

May 3, 2011 - 11:56am #11

Out of curiosity, can you build the NDK hello-gl2 sample project? It's located in the ndk directory's samples folder.

I'm looking at this thread with a user who has a similar problem: http://stackoverflow.com/questions/4724385/android-ndk-build-system-building-hello-gl2

You may just need to reinstall your android platforms.

- Kim

Re: I can't run ImageTargets

May 3, 2011 - 10:50am #10

Thank ksiva for the fast response.

I did check and the Android NDK is already in the path since I follow the instruction of step 1. I even restart the machine couple of times.

Still the same error message.

Re: I can't run ImageTargets

May 3, 2011 - 10:35am #9

truyenle:

It looks like the Android NDK isn't on your path (all those missing files are part of the NDK). Make sure you append ;C:\Development\Android\android-ndk-r5b\ to your system path. Restart Cygwin after adding this. See the Getting Started Guide > Step 1 > Android NDK for more details.

tsungyu:

You need to install the "make" utility in Cygwin. See the Getting Started Guide > Step 1 > Cygwin Environment for more details.

- Kim

Re: I can't run ImageTargets

May 3, 2011 - 9:35am #8

Hello,

I also can not run imagetargets,
The following command and message were show in cygwin console:
But, I got an ERROR. Do I miss anything?
.....
$ cd $NDK

joye@Henry /cygdrive/c/eclipse/android_ndk
$ cd /cygdrive/c/eclipse/qcar_sdk/samples/ImageTargets_TEST

joye@Henry /cygdrive/c/eclipse/qcar_sdk/samples/ImageTargets_TEST
$ ndk-build
ERROR: Cannot find 'make' program. Please install Cygwin make package
or define the GNUMAKE variable to point to it.
..

Thanks for any help.

Tseng-Yu Liu

Re: I can't run ImageTargets

May 3, 2011 - 9:26am #7

My case is different as when I compile the ImageTargets. Here is the step that I did
0. Follow step 1 and 2 of Getting Start manual at https://ar.qualcomm.com/qdevnet/sdk
Now come to step 3.
1. Start cygwin
2. Navigate to /cygdrive/c/Development/Android/qcar-sdk-1-0-0/samples/ImageTargets
3. ndk-build
Here is the output that indicate lacking of .h files as:
$ 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
Install : libImageTargets.so => libs/armeabi/libImageTargets.so
Install : libQCAR.so => libs/armeabi/libQCAR.so
Compile++ arm : ImageTargets C:/Development/Android/qcar-sdk-1-0-0/samples/ImageTargets/jni/ImageTargets.cpp:15:17: error: jni.h: No such file or directory
C:/Development/Android/qcar-sdk-1-0-0/samples/ImageTargets/jni/ImageTargets.cpp:16:25: error: android/log.h: No such file or directory
In file included from C:/Development/Android/qcar-sdk-1-0-0/samples/ImageTargets/jni/ImageTargets.cpp:17:
C:\Development\Android\android-ndk-r5b\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\../lib/gcc/arm-linux-androideabi/4.4.3/include-fixed/stdio.h:50:23: error: sys/cdefs.h: No such file
or directory
C:\Development\Android\android-ndk-r5b\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\../lib/gcc/arm-linux-androideabi/4.4.3/include-fixed/stdio.h:51:24: error: sys/_types.h: No such file
or directory
C:/Development/Android/qcar-sdk-1-0-0/samples/ImageTargets/jni/ImageTargets.cpp:18:20: error: string.h: No such file or directory
C:/Development/Android/qcar-sdk-1-0-0/samples/ImageTargets/jni/ImageTargets.cpp:19:20: error: assert.h: No such file or directory
C:/Development/Android/qcar-sdk-1-0-0/samples/ImageTargets/jni/ImageTargets.cpp:25:23: error: GLES2/gl2.h: No such file or directory
C:/Development/Android/qcar-sdk-1-0-0/samples/ImageTargets/jni/ImageTargets.cpp:26:26: error: GLES2/gl2ext.h: No such file or directory
In file included from C:/Development/Android/qcar-sdk-1-0-0/samples/ImageTargets/jni/ImageTargets.cpp:17:
C:\Development\Android\android-ndk-r5b\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\../lib/gcc/arm-linux-androideabi/4.4.3/include-fixed/stdio.h:163: error: expected constructor, destru
ctor, or type conversion before 'extern'
C:\Development\Android\android-ndk-r5b\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\../lib/gcc/arm-linux-androideabi/4.4.3/include-fixed/stdio.h:164: error: '__END_DECLS' does not name
a type
C:\Development\Android\android-ndk-r5b\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\../lib/gcc/arm-linux-androideabi/4.4.3/include-fixed/stdio.h:301: error: '__END_DECLS' does not name
a type
C:\Development\Android\android-ndk-r5b\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\../lib/gcc/arm-linux-androideabi/4.4.3/include-fixed/stdio.h:393: error: expected constructor, destru
ctor, or type conversion before 'static'
In file included from C:/Development/Android/qcar-sdk-1-0-0/samples/ImageTargets/jni/ImageTargets.cpp:39:
C:/Development/Android/qcar-sdk-1-0-0/samples/ImageTargets/jni/Texture.h:39: error: expected ';' before '(' token
C:/Development/Android/qcar-sdk-1-0-0/samples/ImageTargets/jni/ImageTargets.cpp:55: error: 'GLint' does not name a type
C:/Development/Android/qcar-sdk-1-0-0/samples/ImageTargets/jni/ImageTargets.cpp:56: error: 'GLint' does not name a type
C:/Development/Android/qcar-sdk-1-0-0/samples/ImageTargets/jni/ImageTargets.cpp:57: error: 'GLint' does not name a type
C:/Development/Android/qcar-sdk-1-0-0/samples/ImageTargets/jni/ImageTargets.cpp:58: error: 'GLint' does not name a type
C:/Development/Android/qcar-sdk-1-0-0/samples/ImageTargets/jni/ImageTargets.cpp:75: error: expected constructor, destructor, or type conversion before 'int'
C:/Development/Android/qcar-sdk-1-0-0/samples/ImageTargets/jni/ImageTargets.cpp:86: error: expected constructor, destructor, or type conversion before 'void'
C:/Development/Android/qcar-sdk-1-0-0/samples/ImageTargets/jni/ImageTargets.cpp:93: error: expected constructor, destructor, or type conversion before 'void'
C:/Development/Android/qcar-sdk-1-0-0/samples/ImageTargets/jni/ImageTargets.cpp:103: error: expected constructor, destructor, or type conversion before 'void'
C:/Development/Android/qcar-sdk-1-0-0/samples/ImageTargets/jni/ImageTargets.cpp:456: error: expected '}' at end of input
make: *** [/cygdrive/c/Development/Android/qcar-sdk-1-0-0/samples/ImageTargets/obj/local/armeabi-v7a/objs-debug/ImageTargets/ImageTargets.o] Error 1

I'm a New B for this SDK, any clue how to fix this please help.
Thanks
Truyenle

Re: I can't run ImageTargets

March 14, 2011 - 6:20am #6

What operating system are you using? Cygwin is required to run the "ndk-build" program in Windows, you will have to get it working before you can proceed. You might want to try a fresh install of Cygwin if it is crashing every time you run it.

- Kim

Re: I can't run ImageTargets

March 13, 2011 - 11:20pm #5

Its seem so much complicated in following step (Compile the Shared Object
)

https://ar.qualcomm.com/qdevnet/sdk?&sdk_type=NFT&sys_name=sdk%20-%20windows&file_name=qcar-sdk-0.10.0.exe

I already install cygwin in android sdk folder. Now i can not open cygwin.bat. I also tried to open it by dos. but still can't open. cygwin black screen pops up and immediaetly gone.

Without run NDK build , I able to build the program and install the imagetarget.apk in my desire.but application not open and give error"The application Imagetarget has stopped unexpectedly"

So please help me how i can run ndk build..

thanks
Rassall

Re: I can't run ImageTargets

January 28, 2011 - 5:40am #4

I suggest starting over and following the directions in the Get Started guide carefully. Here are a few important points:

1) Be sure to set the QCAR Environment Variable, QCAR_SDK_ROOT, in Eclipse (see Step 2).

2) Be sure to run "ndk-build" on the command line (Cygwin in Windows) to compile the libImageTargets.so shared library.

3) Be sure to create a new project from existing source. This tends to work better than importing the project.

4) Now try cleaning your project, Project > Clean. This will force a build.

You shouldn't have to add any libraries using Build Path > Libraries >
Add JARs. The project is already set up with all the dependencies in place. If you are working on a Mac or Linux you need to go to the Project Properties > Builders section and switch the Import QCAR builder.

- Kim

Re: I can't run ImageTargets

January 27, 2011 - 10:35pm #3

Thank you
I have libQCAR.so in my project but I also have this problem.
I have two Libraries in my project.
One is "Android2.1-update1" and have "android.jar" in this Library.
Two is "Referenced Libraries" and have "libQCAR.so" and "QCAR.jar"

I see my "QCAR.jar" have some class ,just like "FileTools.class"or "QCAR.class"
but I see my "libQCAR.so" doesn't have any class, is a problem with this place?
My "libQCAR.so" route is C:\Development\Android\qcar-sdk-0-10-0\samples\ImageTargets\libs\armeabi\libQCAR.so.
I add it on Build Path -> Libraries -> Add JARs.

If somebody can help me, I would really appreciate it.

Re: I can't run ImageTargets

January 27, 2011 - 5:18am #2

This is the important error:

ERROR/QCAR(5119): The library libImageTargets.so could not be loaded

Run "ndk-build" in the ImageTargets directory to create this library, then refresh the project in Eclipse (right-click on the project in the Package Explorer and choose Refresh). You should now see this file inside the libs folders in in Eclipse. When you build the project, libQCAR.so should also be added to these folders.

- Kim

Log in or register to post comments