Issue
hello i am beginner in developing ndk apps.
I was going to build sample application but i got following errors while Compiling the native code using the ndk-build command.
I am using UBUNTU OS.
nidhi@php-pc1:~/android-sdk-linux_x86/android-ndk-r7/samples/hello-jni$ /home/nidhi/android-sdk-linux_x86/android-ndk-r7/ndk-build
Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver
Gdbsetup : libs/armeabi/gdb.setup
Compile thumb : hello-jni <= hello-jni.c
arm-linux-androideabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
make: *** [obj/local/armeabi/objs-debug/hello-jni/hello-jni.o] Error 1
please help me to solve..
Edit:
i solve this by set PATH
export PATH=$PATH:/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2
but new error occur
`
android-sdk-linux_x86/android-ndk-r7/samples/hello-jni$ /home/nidhi/android-sdk-linux_x86/android-ndk-r7/ndk-build
Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver
Gdbsetup : libs/armeabi/gdb.setup
Compile thumb : hello-jni <= hello-jni.c
cc1: error: unrecognized command line option "-mbionic"
cc1: error: unrecognized command line option "-mthumb"
cc1: error: unrecognized command line option "-mfpu=vfp"
jni/hello-jni.c:1:0: error: bad value (armv5te) for -march= switch
jni/hello-jni.c:1:0: error: bad value (xscale) for -mtune= switch
make: *** [obj/local/armeabi/objs-debug/hello-jni/hello-jni.o] Error 1
pls help .
Edit :
it solve by set Cross complier PATH
export CROSS_COMPILER=$PATH:/home/nidhi/android-sdk-linux_x86/android-ndk-r7/prebuilt/linux-x86/bin/
Solution
it solve by set Cross complier PATH
export CROSS_COMPILER=$PATH:/home/nidhi/android-sdk-linux_x86/android-ndk-r7/prebuilt/linux-x86/bin/
Answered By - Chirag
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.