Hi ALL,
Facing issues with NDK
I had successfully compile ndk file in our machine. but when we trying to check path via $PATH.
then i am getting below error:
-bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/ritesh/android-sdk-linux/tools:/home/ritesh/android-sdk-linux/platform-tools:/home/ritesh/android-ndk-r10e: No such file or directory
here ,
Compilation message :-
Extracting android-ndk-r10e/build/gmsl
Extracting android-ndk-r10e/build/core
Heading
Extracting android-ndk-r10e/build/awk
Extracting android-ndk-r10e/build
Extracting android-ndk-r10e
Everything is Ok
######################
ritesh@ritesh-virtual-machine:~$ pwd
/home/ritesh
ritesh@ritesh-virtual-machine:~$
itesh@ritesh-virtual-machine:~$ ls -la
total 711060
drwxr-xr-x 22 ritesh ritesh 4096 Apr 26 00:20 .
drwxr-xr-x 3 root root 4096 Apr 10 21:00 …
drwxr-x— 2 root root 4096 Apr 11 12:53 .android
drwxrwxrwx 10 root root 4096 Apr 7 2015 android-ndk-r10e
-rwxrwxr-x 1 ritesh ritesh 401522849 Apr 12 22:01 android-ndk-r10e-linux-x86_64.bin
drwxrwxrwx 5 249512 5000 4096 Apr 25 21:45 android-sdk-linux
-rwxr-xr-x 1 root root 326412652 Apr 25 21:39 android-sdk_r24.4.1-linux.tgz
cat .bashrc
export PATH=${PATH}:/home/ritesh/android-sdk-linux/tools
export PATH=${PATH}:/home/ritesh/android-sdk-linux/platform-tools
export PATH=${PATH}:/home/ritesh/android-ndk-r10e
export ANDROID_EMULATOR_FORCE_32BIT=true
++Admin -
Please look into this.
your valuable suggestion more benefit for me.
@Ritesh , Try to run this command:
sudo source ~/.bashrc
raghuu
May 5, 2016, 12:20pm
#4
Set the environment variable and try it again
#vim ~/.bashrc
export ANDROID_NDK_ROOT=/home/user/android-ndk
@raghuu -
i have already applied these step - you can see post,
Folder name : android-ndk-r10e
.bashrc entry : export PATH=${PATH}:/home/ritesh/android-ndk-r10e
&
when we trying to check path via $PATH.
then i am getting below error:
-bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/ritesh/android-sdk-linux/tools:/home/ritesh/android-sdk-linux/platform-tools:/home/ritesh/android-ndk-r10e: No such file or directory
From the above error if the /home/ritesh/android-ndk-r10e exists then the problem could be with either; [quote=""]
export PATH=${PATH}:/home/ritesh/android-sdk-linux/tools
[/quote]
or
Try checking if these directories exists.
I have Change the folder the directory as well.still the same result getting
ritesh@ritesh-virtual-machine:~$ $PATH
-bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/android_sdk/tools:/ opt/android_sdk/platform-tools:/opt/android_ndk: No such file or directory
ritesh@ritesh-virtual-machine:~$
ritesh@ritesh-virtual-machine:~$
ritesh@ritesh-virtual-machine:~$ cd /opt/
ritesh@ritesh-virtual-machine:/opt$ ls
android_ndk android-ndk-r10e-linux-x86_64.bin android_sdk
ritesh@ritesh-virtual-machine:/opt$
ritesh@ritesh-virtual-machine:/opt$
ritesh@ritesh-virtual-machine:/opt$ cd android_sdk/
ritesh@ritesh-virtual-machine:/opt/android_sdk$
ritesh@ritesh-virtual-machine:/opt/android_sdk$ ll
total 52
drwxrwxrwx 12 249512 5000 4096 Apr 13 17:54 ./
drwxr-xr-x 7 root root 4096 May 9 00:34 …/
drwxrwxr-x 3 249512 5000 4096 Apr 12 12:01 add-ons/
drwxr-xr-x 10 root root 4096 Apr 12 17:20 build-tools/
drwxr-xr-x 25 root root 4096 Apr 11 10:54 docs/
drwxr-xr-x 4 root root 4096 Apr 11 12:34 extras/
drwxrwxr-x 4 249512 5000 4096 Apr 12 12:42 platforms/
drwxr-xr-x 5 root root 4096 Apr 13 17:54 platform-tools/
-rw-rw-r-- 1 249512 5000 1158 Oct 14 2015 SDK Readme.txt
drwxr-xr-x 3 root root 4096 Apr 11 11:16 sources/
drwxr-xr-x 4 root root 4096 Apr 12 13:55 system-images/
drwxr-xr-x 2 root root 4096 Apr 13 17:54 temp/
drwxr-xr-x 11 root root 4096 Apr 13 17:54 tools/
ritesh@ritesh-virtual-machine:/opt/android_sdk$
ritesh@ritesh-virtual-machine:/opt/android_sdk$
ritesh@ritesh-virtual-machine:/opt/android_sdk$ pwd
/opt/android_sdk
ritesh@ritesh-virtual-machine:/opt/android_sdk$
ritesh@ritesh-virtual-machine:/opt/android_sdk$
ritesh@ritesh-virtual-machine:/opt/android_sdk$ d /opt/android_ndk/
ritesh@ritesh-virtual-machine:/opt/android_ndk$ ll
total 976
drwxrwxrwx 10 root root 4096 Apr 17 00:47 ./
drwxr-xr-x 7 root root 4096 May 9 00:34 …/
drwxr-xr-x 6 root root 4096 Apr 17 00:40 build/
drwxr-xr-x 5 root root 4096 Apr 17 00:40 docs/
-rwxr-xr-x 1 root root 856 Apr 17 00:40 find-win-host.cmd*
-rwxr-xr-x 1 root root 1306 Apr 17 00:40 GNUmakefile*
-rwxr-xr-x 1 root root 9820 Apr 17 00:47 ndk-build*
-rwxr-xr-x 1 root root 292 Apr 17 00:47 ndk-build.cmd*
-rwxr-xr-x 1 root root 39888 Apr 17 00:47 ndk-depends*
-rwxr-xr-x 1 root root 27745 Apr 17 00:47 ndk-gdb*
-rwxr-xr-x 1 root root 355 Apr 17 00:47 ndk-gdb-py*
-rwxr-xr-x 1 root root 35851 Apr 17 00:47 ndk-gdb.py*
-rwxr-xr-x 1 root root 294 Apr 17 00:40 ndk-gdb-py.cmd*
-rwxr-xr-x 1 root root 802400 Apr 17 00:47 ndk-stack*
-rwxr-xr-x 1 root root 1671 Apr 17 00:47 ndk-which*
drwxr-xr-x 16 root root 4096 Apr 17 00:47 platforms/
drwxr-xr-x 10 root root 4096 Apr 17 00:47 prebuilt/
-rwxr-xr-x 1 root root 1360 Apr 17 00:47 README.TXT*
-rwxr-xr-x 1 root root 18 Apr 17 00:40 RELEASE.TXT*
-rwxr-xr-x 1 root root 328 Apr 17 00:47 remove-windows-symlink.sh*
drwxr-xr-x 19 root root 4096 Apr 17 00:47 samples/
drwxr-xr-x 6 root root 4096 Apr 17 00:38 sources/
drwxr-xr-x 7 root root 4096 Apr 17 00:47 tests/
drwxr-xr-x 26 root root 4096 Apr 17 00:49 toolchains/
ritesh@ritesh-virtual-machine:/opt/android_ndk$ pwd
/opt/android_ndk
ritesh@ritesh-virtual-machine:/opt/android_ndk$
Extract the downloaded ndk tools to directory android_ndk and add these following lines and share the output.
export ANDROID_NDK_ROOT=/path/to/android_ndk
export PATH=$PATH:$ANDROID_NDK
and also set the environment variable ANDROID_SDK_ROOT to point to android_sdk
export ANDROID_SDK_ROOT=/path/to/android_sdk
export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools
export PATH=$PATH:$ANDROID_SDK_ROOT/tools
Ritesh
May 9, 2016, 11:45am
#9
Hi still, getting sam e error : no such a directory:
ritesh@ritesh-virtual-machine:~$ head -n 12 .bashrc
export ANDROID_NDK_ROOT=/opt/android_ndk
export PATH=$PATH:$ANDROID_NDK
export ANDROID_SDK_ROOT=/opt/android_sdk
export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools
export PATH=$PATH:$ANDROID_SDK_ROOT/tools
ritesh@ritesh-virtual-machine:~$ head -n 12 .bashrc^C
ritesh@ritesh-virtual-machine:~$
ritesh@ritesh-virtual-machine:~$
ritesh@ritesh-virtual-machine:~$ $PATH
-bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games::/opt/android_sdk/platform-tools:/opt/android_sdk/tools: No such file or directory
ritesh@ritesh-virtual-machine:~$
ritesh@ritesh-virtual-machine:~$
Ritesh
May 10, 2016, 2:24pm
#10
any Update ?
Please help me out to set environment.
raghuu
May 11, 2016, 4:25am
#11
try $PATH:$ANDROID_NDK_ROOT instead of $PATH:$ANDROID_NDK
export ANDROID_NDK_ROOT=/path/to/android_ndk
export PATH=$PATH:$ANDROID_NDK_ROOT
and also try the below path if you face any issue with above one
export NDK=/path/to/android-ndk-r10c
Ritesh
May 11, 2016, 5:42am
#12
@raghuu - still not getting any success .
ritesh@ritesh-virtual-machine:~$ head -n 12 .bashrc
export ANDROID_NDK_ROOT=/opt/android_ndk
export PATH=$PATH:$ANDROID_NDK_ROOT
export ANDROID_SDK_ROOT=/opt/android_sdk
export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools
export PATH=$PATH:$ANDROID_SDK_ROOT/tools
export ANDROID_EMULATOR_FORCE_32BIT=true
ritesh@ritesh-virtual-machine:~$
ritesh@ritesh-virtual-machine:~$ $PATH
-bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/android_ndk:/opt/android_sdk/platform-tools:/opt/android_sdk/tools: No such file or directory
raghuu
May 11, 2016, 5:44am
#13
Ritesh
May 11, 2016, 8:47am
#14
export PATH=$PATH:/opt/android_sdk/tools:/opt/android_sdk/platform-tools
export NDK=/opt/android_ndk/
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
ritesh@ritesh-virtual-machine:~$ $PATH
-bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/android_sdk/tools:/opt/android_sdk/platform-tools: No such file or directory
ritesh@ritesh-virtual-machine:~$