Log in or register to post comments

Running android-ndk-r8 on windows 7 using Cygwin

July 1, 2012 - 12:11am #1

I am starting to work on android ndk but I am unable to build the sample apps provided with

android-ndk-r8. I followed the steps mentioned on https://ar.qualcomm.at/qdevnet/sdk/android.

When I gine the ndk-build command it always gives me this error messag "-bash: ndk-build: command not found"

I am using windows 7 64bit. Can anybody help me to solve this problem

 

Running android-ndk-r8 on windows 7 using Cygwin

July 16, 2012 - 5:23pm #14

 

Problem Solved.

https://ar.qualcomm.at/node/2001874  thread help me to solve it.

 

Running android-ndk-r8 on windows 7 using Cygwin

July 16, 2012 - 4:22pm #13

Yes,

I was able to compile the code using cygwin. It was mistake that I was trying to compile sample from the place with folder name with spaces.

But, still I am not able to see the code running.

It get this error in eclipse logcat when I try to run the code and the application crashes without initialization

 

"07-16 16:01:13.433: E/AndroidRuntime(22033): FATAL EXCEPTION: main

07-16 16:01:13.433: E/AndroidRuntime(22033): java.lang.ExceptionInInitializerError

07-16 16:01:13.433: E/AndroidRuntime(22033): at java.lang.Class.newInstanceImpl(Native Method)

07-16 16:01:13.433: E/AndroidRuntime(22033): at java.lang.Class.newInstance(Class.java:1319)

07-16 16:01:13.433: E/AndroidRuntime(22033): at android.app.Instrumentation.newActivity(Instrumentation.java:1023)

07-16 16:01:13.433: E/AndroidRuntime(22033): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871)

07-16 16:01:13.433: E/AndroidRuntime(22033): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)

07-16 16:01:13.433: E/AndroidRuntime(22033): at android.app.ActivityThread.access$600(ActivityThread.java:123)

07-16 16:01:13.433: E/AndroidRuntime(22033): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)

07-16 16:01:13.433: E/AndroidRuntime(22033): at android.os.Handler.dispatchMessage(Handler.java:99)

07-16 16:01:13.433: E/AndroidRuntime(22033): at android.os.Looper.loop(Looper.java:137)

07-16 16:01:13.433: E/AndroidRuntime(22033): at android.app.ActivityThread.main(ActivityThread.java:4424)

07-16 16:01:13.433: E/AndroidRuntime(22033): at java.lang.reflect.Method.invokeNative(Native Method)

07-16 16:01:13.433: E/AndroidRuntime(22033): at java.lang.reflect.Method.invoke(Method.java:511)

07-16 16:01:13.433: E/AndroidRuntime(22033): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)

07-16 16:01:13.433: E/AndroidRuntime(22033): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)

07-16 16:01:13.433: E/AndroidRuntime(22033): at dalvik.system.NativeStart.main(Native Method)

07-16 16:01:13.433: E/AndroidRuntime(22033): Caused by: java.lang.NoClassDefFoundError: com/qualcomm/ar/pl/CameraPreview

07-16 16:01:13.433: E/AndroidRuntime(22033): at java.lang.Runtime.nativeLoad(Native Method)

07-16 16:01:13.433: E/AndroidRuntime(22033): at java.lang.Runtime.loadLibrary(Runtime.java:368)

07-16 16:01:13.433: E/AndroidRuntime(22033): at java.lang.System.loadLibrary(System.java:535)

07-16 16:01:13.433: E/AndroidRuntime(22033): at com.qualcomm.QCARSamples.FrameMarkers.FrameMarkers.loadLibrary(FrameMarkers.java:675)

07-16 16:01:13.433: E/AndroidRuntime(22033): at com.qualcomm.QCARSamples.FrameMarkers.FrameMarkers.<clinit>(FrameMarkers.java:101)

07-16 16:01:13.433: E/AndroidRuntime(22033): ... 15 more

07-16 16:01:13.433: E/AndroidRuntime(22033): Caused by: java.lang.ClassNotFoundException: com.qualcomm.ar.pl.CameraPreview

07-16 16:01:13.433: E/AndroidRuntime(22033): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)

07-16 16:01:13.433: E/AndroidRuntime(22033): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)

07-16 16:01:13.433: E/AndroidRuntime(22033): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)

07-16 16:01:13.433: E/AndroidRuntime(22033): ... 20 more

07-16 16:02:16.097: E/AndroidRuntime(22098): FATAL EXCEPTION: main

07-16 16:02:16.097: E/AndroidRuntime(22098): java.lang.ExceptionInInitializerError

07-16 16:02:16.097: E/AndroidRuntime(22098): at java.lang.Class.newInstanceImpl(Native Method)

07-16 16:02:16.097: E/AndroidRuntime(22098): at java.lang.Class.newInstance(Class.java:1319)

07-16 16:02:16.097: E/AndroidRuntime(22098): at android.app.Instrumentation.newActivity(Instrumentation.java:1023)

07-16 16:02:16.097: E/AndroidRuntime(22098): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871)

07-16 16:02:16.097: E/AndroidRuntime(22098): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)

07-16 16:02:16.097: E/AndroidRuntime(22098): at android.app.ActivityThread.access$600(ActivityThread.java:123)

07-16 16:02:16.097: E/AndroidRuntime(22098): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)

07-16 16:02:16.097: E/AndroidRuntime(22098): at android.os.Handler.dispatchMessage(Handler.java:99)

07-16 16:02:16.097: E/AndroidRuntime(22098): at android.os.Looper.loop(Looper.java:137)

07-16 16:02:16.097: E/AndroidRuntime(22098): at android.app.ActivityThread.main(ActivityThread.java:4424)

07-16 16:02:16.097: E/AndroidRuntime(22098): at java.lang.reflect.Method.invokeNative(Native Method)

07-16 16:02:16.097: E/AndroidRuntime(22098): at java.lang.reflect.Method.invoke(Method.java:511)

07-16 16:02:16.097: E/AndroidRuntime(22098): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)

07-16 16:02:16.097: E/AndroidRuntime(22098): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)

07-16 16:02:16.097: E/AndroidRuntime(22098): at dalvik.system.NativeStart.main(Native Method)

07-16 16:02:16.097: E/AndroidRuntime(22098): Caused by: java.lang.NoClassDefFoundError: com/qualcomm/ar/pl/CameraPreview

07-16 16:02:16.097: E/AndroidRuntime(22098): at java.lang.Runtime.nativeLoad(Native Method)

07-16 16:02:16.097: E/AndroidRuntime(22098): at java.lang.Runtime.loadLibrary(Runtime.java:368)

07-16 16:02:16.097: E/AndroidRuntime(22098): at java.lang.System.loadLibrary(System.java:535)

07-16 16:02:16.097: E/AndroidRuntime(22098): at com.qualcomm.QCARSamples.FrameMarkers.FrameMarkers.loadLibrary(FrameMarkers.java:678)

07-16 16:02:16.097: E/AndroidRuntime(22098): at com.qualcomm.QCARSamples.FrameMarkers.FrameMarkers.<clinit>(FrameMarkers.java:101)

07-16 16:02:16.097: E/AndroidRuntime(22098): ... 15 more

07-16 16:02:16.097: E/AndroidRuntime(22098): Caused by: java.lang.ClassNotFoundException: com.qualcomm.ar.pl.CameraPreview

07-16 16:02:16.097: E/AndroidRuntime(22098): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)

07-16 16:02:16.097: E/AndroidRuntime(22098): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)

07-16 16:02:16.097: E/AndroidRuntime(22098): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)

07-16 16:02:16.097: E/AndroidRuntime(22098): ... 20 more

"

Running android-ndk-r8 on windows 7 using Cygwin

July 13, 2012 - 9:50am #12

Have you been able to resolve this issue?

Be sure to run ndk-build in the base directory of the sample.

Running android-ndk-r8 on windows 7 using Cygwin

July 9, 2012 - 4:59pm #11

I get the same error 

 

$ndk-build

Android NDK: ERROR:jni/Android.mk:QCAR-prebuilt: LOCAL_SRC_FILES points to a missing file

Android NDK: Check that jni/../../../build/lib/armeabi/libQCAR.so exists  or that its path is correct

/cygdrive/C/Android/android-ndk-r8/build/core/prebuilt-library.mk:43: *** Android NDK: Aborting    .  Stop.

 
 
ndk-build builds .so file for the given examples in the android ndk
 
Also, I did not made any change to the examples from the vuforia sdk and tried to build .so for them, but it did not work. 
 
Thanks

Running android-ndk-r8 on windows 7 using Cygwin

July 9, 2012 - 3:48pm #10

So you're calling ndk-build using its path? What happens when you simply execute 'ndk-build' within the sample's directory?

 

Running android-ndk-r8 on windows 7 using Cygwin

July 9, 2012 - 3:34pm #9

Hi,

I am using windows 7 64-bit machine to compile of the example from the latest vuforia sdk.

I get the following error when I try to build .so from cygwin terminal

$ /cygdrive/C/Android/android-ndk-r8/ndk-build

Android NDK: ERROR:jni/Android.mk:QCAR-prebuilt: LOCAL_SRC_FILES points to a missing file

Android NDK: Check that jni/../../../build/lib/armeabi/libQCAR.so exists  or that its path is correct

/cygdrive/C/Android/android-ndk-r8/build/core/prebuilt-library.mk:43: *** Android NDK: Aborting    .  Stop.

Can anyone please help me with this ?

Thanks


 

 

Running android-ndk-r8 on windows 7 using Cygwin

July 5, 2012 - 7:51am #8

Thanks David for your help

Problem is solved know. I dont know that why ndk-build was missing

from the android-ndk.zip which I downloaded. I downloaded it again

and know its working.

Running android-ndk-r8 on windows 7 using Cygwin

July 4, 2012 - 2:48pm #7

You should have a ndk-build.cmd and another ndk-build file with no extension in the android-ndk-r8 directory.

Running android-ndk-r8 on windows 7 using Cygwin

July 4, 2012 - 11:15am #6

Yes I have added it to windows path.

Is there some file named ndk-build.exe that comes with android-ndk .zip package?

I dont have any file named ndk-build.exe in my copy of android-ndk

Running android-ndk-r8 on windows 7 using Cygwin

July 4, 2012 - 4:07am #5

Comments removed by admin

Running android-ndk-r8 on windows 7 using Cygwin

July 3, 2012 - 7:56am #4

Have you added the NDK to your Windows PATH?

NDK requires the above directory to be added to the Windows path! To do this right-click on 'My Computer' on the desktop and select properties. On the 'Advanced' tabs select 'Environment Variables' and look for Variable 'Path' in the 'System variables' window. After pressing 'Edit', scroll to the end of 'Variable value:' and add the full path to the directory to the end of the path, separated via semicolon from the one before. In the above example, you would have to add:

;C:\Development\Android\android-ndk-r8\

 

The steps are outlined in the Getting Started guide under Setting Up The Development Environment - https://ar.qualcomm.at/sdk

Running android-ndk-r8 on windows 7 using Cygwin

July 2, 2012 - 10:32pm #3

Thanks for reply,

But I am running the ndk-build command in cygwin terminal.

Can you please mention that what environment variables you have set

and other configuraations you have done. I am not able to find where i went

wrong

Running android-ndk-r8 on windows 7 using Cygwin

July 2, 2012 - 1:16am #2

Hi,

I've experienced a similar issue. The problem was, that I run the ndk-build command in windows command line instead of the cygwin command line tool.

Log in or register to post comments