NDK No such file or directory - android

I am trying to download the Android NDK and extract the android-ndk-r10c-linux-x86_64.bin package. The web site says to do the following:
chmod a+x android-ndk-r10c-linux-x86_64.bin
./android-ndk-r10c-linux-x86_64.bin
Step 2 gives the following errors: No such file or directory
Any help? This should be easy.
I am running Ubuntu 14.04.1 LTS x86_64.
So I was able to run the command after installing all the build tools
I am not sure which one did the trick but it works now:
apt-get install bison build-essential curl flex git-core gnupg gperf libesd0-dev libncurses5-dev libsdl1.2-dev libwxgtk2.8-dev libxml2 libxml2-utils lzop openjdk-6-jdk openjdk-6-jre pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev

Do you have a 32bit machine? You can get that error if you're running a 64bit binary on a 32bit machine. Try downloading the 32bit version.
Check your version with: uname -a and see if it's x86_64 or not.
The other issue might be that you're missing libraries. You can check by running ldd [filename]. I'm going to guess you need to sudo apt-get install ia32-libs

using
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libstdc++6:i386
or using 7z to extract the bin
sudo apt-get install p7zip-full
7z x *bin
for the reason why (Ubuntu 14.04 64bits / android ndk r10c) will have an error, you can visit https://code.google.com/p/android/issues/detail?id=78148

Which OS are you under?
It seems you downloaded the one for linux.
the instructions are for darwin - mac OS - perhaps you need to change the command to the actual file name.
No such file errors are usually because you either don't have the correct permissions (make sure you typed the file correctly running (1)) or there's a library missing for running the file, in which case try running
ldd filename
to check if all required local libraries are present.

Related

How to make Android's aapt and adb work on 64-bit Ubuntu without ia32-libs (works for versions 12, 13 and 14)

Since Ubuntu 13.10 no longer has ia32-libs I cannot get my android development environment running on a clean install of 13.10.
The error is ~/android-studio/sdk/build-tools/android-4.2.2/aapt": error=2, No such file or directory
This file does exist and is executable but it is a 32bit executable.
In previous installs I just installed ia32-libs to fix this but this solution no longer works for Ubuntu 13.10.
I have tried solutions proposed by askubuntu questions eg. this one https://askubuntu.com/questions/107230/what-happened-to-the-ia32-libs-package
but it isn't working for me.
From that askubuntu.com answer I see I should install separate packages with
sudo apt-get install package:i386
but I don't know which packages to install to make the android tools work again.
Has anyone else solved this problem and or does anyone have a list of packages which need to be installed for the android tools?
Another way(without adding i386 architecture)...
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
sudo apt-get install lib32z1
Ref: Fix Android adb on Ubuntu 13.10 64bit
While dpkg --add-architecture i386 command is not needed in the current version of Ubuntu (13.10), it is required in the current Debian versions (7.x) and it will be required in the future Ubuntu versions as well. So I am going to leave it in. Just ignore it for Ubuntu 13.10.
sudo dpkg --add-architecture i386
sudo apt-get -qqy update
sudo apt-get -qqy install libncurses5:i386 libstdc++6:i386 zlib1g:i386
Update: aapt indeed requires zlib so I added it to the list. But you should not be needing any lib32 packages.
It's just a matter giving sdk files the necessary permissions.
sudo chmod -R +x /path/to/android-sdk-linux
Restart Android Studio and see if that fix it.
Permission issues typically occur when you copy/move sdk files from a NTFS partition or copying from another computer.
On Ubuntu 14.04 LTS x64 and buildToolsVersion 21/22 it was enough to execute the following:
sudo apt-get install libc6:i386 libstdc++6:i386
sudo apt-get install zlib1g:i386
The error I was getting:
Execution failed for task ':core:processReleaseResources'.
> A problem occurred starting process 'command '/home/user/androidSDK/android-sdk/build-tools/21.1.2/aapt''
install 13.04 ia32-libs (raring ringtail)
instructions: http://bisonf.wordpress.com/2013/10/19/ubuntu-13-10-how-to-properly-install-ia32-libs-and-ia32-libs-multiarch/

Cannot run program " xx/sdk//tools/emulator": java.io.IOException: error=2, No such file or directory

I have installed android SDK and android eclipse plugin successfully on Ubuntu 12.10.
I created the AVD in eclipse, and now it's not running. This is the output error I receive when I run the AVD:it tips:
Starting emulator for AVD 'avd'
Failed to start emulator: Cannot run program "/home/sancai/android/adt-bundle-linux-x86_64-20130522/sdk//tools/emulator": java.io.IOException: error=2, No such file or directory
I find information via google, everyone says this is because my system version is 64, while the adt only support 32, to install: sudo apt-get install ia32-libs, when I installed the 32-bit library, other problems arise such as the library file association to other libraries, but has no other library files are fully,it tips:
sancai#ubuntu:~$ sudo apt-get install ia32-libs
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
ia32-libs : Depends: ia32-libs-multiarch but it is not installable
E: Unable to correct problems, you have held broken packages.
sancai#ubuntu:~$ sudo apt-get install ia32-libs-multiarch
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ia32-libs-multiarch is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'ia32-libs-multiarch' has no installation candidate
This should help:
Go to xx/sdk/tools and run:
mv emulator emulator.bak
ln -s emulator64-arm emulator
No need to install any ia32 libs.
This is the answer http://astroelec.blogspot.com/
(using Debian)
Installing ia32-libs will no longer work as debian has moved to multiarch support.
Solution. Use Multiarch
Multiarch support makes installing libraries from the i386 distribution easy...
sudo dpkg --add-architecture i386
sudo aptitude update
sudo aptitude install libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386
Now launch eclipse, and everything should now work just fine.
In my configuration, I have set up the virtual devices to use Intel Atom system image. Lawrence Angrave from the University Illinois said in his Coursera androidapps101 course that it will run faster than the ARM image. So this works for me:
mv emulator emulator_bak
ln -s emulator64-x86 emulator
You do not need install packages any more!
In directory tools, there are many types of emulator, while my computer works with emulator64-arm! My system is Linux Mint 16 amd64! Good luck!
./emulator64-arm #yxphone -sdcard yxsd -scale 0.8
it's easy,this is my solutions.
copy and paste, this lines in your terminal.
apt-get install libncurses5:i386 \
libstdc++6:i386 \
zlib1g:i386
good luck!!
This might help
sudo aptitude install ia32-libs lib32ncurses5 lib32stdc++6

Error libGL.so: cannot open shared object file using Android emulator

I was trying to run android emulator in Ubuntu 12.04(64-bit). But, I got the following errors.
Starting emulator for AVD 'emulatr'
Failed to load libGL.so
error libGL.so: cannot open shared object file: No such file or directory
Failed to load libGL.so
error libGL.so: cannot open shared object file: No such file or directory
emulator: emulator window was out of view and was recentered
After using locate libGL. I found
/home/adnan/android-sdk-linux/tools/lib/libGL.so
/usr/lib/libGL.so
/usr/lib/i386-linux-gnu/libGL.so
/usr/lib/i386-linux-gnu/mesa/libGL.so
/usr/lib/i386-linux-gnu/mesa/libGL.so.1
/usr/lib/i386-linux-gnu/mesa/libGL.so.1.2.0
/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0
I also tried some solution from this question But, didn't work. I will be glad, if you guys help to solve this problem.
http://learnedstuffs.wordpress.com/2012/07/17/fixing-ubuntu-error-failed-to-load-libgl-so/
apt-get install libgl1-mesa-dev
worked for me
On Fedora
sudo yum install mesa-libGL-devel
As I'm using 64-bit Ubuntu 12.04. So, I did this
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
This works for me on Ubuntu 14.04 64-bit:
$ sudo apt-get install libgl1-mesa-dri
$ sudo ln -sv /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 /usr/lib/x86_64-linux-gnu/libGL.so
You don't need the development files for libgl1-mesa, so instead you should/could install libgl1-mesa-dri instead of libgl1-mesa-dev as suggested by others.
This saves you a couple of MB of unnecessary files.
Furthermore, the Android applications are either 32 bit or 64 bit.
For a or a 32 bit Ubuntu you require the 32 bit SDK (as 64 bit does not work):
sudo apt-get install libgl1-mesa-dri
Same goes for a 64-bit Ubuntu with a 64-bit SDK.
But for a 64 bit Ubuntu in combination with a 32 bit SDK, you need to specify that you require the 32 bit version of the package:
sudo apt-get install libgl1-mesa-dri:i386
I too had this problem (fedora 20), but the libGL files already existed on my filesystem. Based on an examination of the libraries on an older fedora 18 installation, I found that I could resolve the problem by providing a symbolic link for libGL.so linking to libGL.so.1.2.0.

Ubuntu 64 with Android 64 Bundle cannot find adb executable

I'm experiencing the following problem when trying to run adb on Ubuntu 12.10, x86_64:
[2013-02-19 20:56:04 - adb] Unexpected exception 'Cannot run program
"/home/user/adt-bundle-linux-x86_64/sdk/platform-tools/adb": error=2,
No such file or directory' while attempting to get adb version from
'/home/user/adt-bundle-linux-x86_64/sdk/platform-tools/adb'
I located adb, tried chmod +x adb and it just doesn't work. I also tried chmod +x platform-tools/
and chmod +x tools/. After that I tried ./adb
I've Googgled for the problem. They were talking about ia32 package. Ubuntu can't locate that package nor the ia32 multi arch whatever.
System is Ubuntu 12.10 64 and I downloaded adt-bundle-linux-x86_64.zip package and just unzip it.
What am I doing wrong ? Thank you!
On Debian 7 I bumped in the same issue.
Diagnosis:
edb#lapelidb:~/today$ ldd /opt/adt-bundle-linux-x86_64-20130729/sdk/platform-tools/adb
not a dynamic executable
edb#lapelidb:~/today$ file /opt/adt-bundle-linux-x86_64-20130729/sdk/platform-tools/adb
/opt/adt-bundle-linux-x86_64-20130729/sdk/platform-tools/adb: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not stripped
Solution: Adding support for 32-bit support and the required 32-bit libraries:
edb#lapelidb:~/today$ sudo dpkg --add-architecture i386
edb#lapelidb:~/today$ sudo apt-get update
edb#lapelidb:~/today$ sudo apt-get install libc6:i386 libstdc++6:i386
Et voila:
edb#lapelidb:~/today$ ldd /opt/adt-bundle-linux-x86_64-20130729/sdk/platform-tools/adb
linux-gate.so.1 => (0xf772a000)
librt.so.1 => /lib/i386-linux-gnu/i686/cmov/librt.so.1 (0xf770a000)
libdl.so.2 => /lib/i386-linux-gnu/i686/cmov/libdl.so.2 (0xf7706000)
libpthread.so.0 => /lib/i386-linux-gnu/i686/cmov/libpthread.so.0 (0xf76ec000)
libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xf7600000)
libm.so.6 => /lib/i386-linux-gnu/i686/cmov/libm.so.6 (0xf75da000)
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf75bd000)
libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xf745a000)
/lib/ld-linux.so.2 (0xf772b000)
I'm using Ubuntu 12.04 LTS version. I've tried the steps suggested by 'amo-ej1', but my 'dpkg' didn't have 'add' or 'architecture' options.
However, the following worked for me:
1) Install 'adb' and 'fastboot' provided by the following third-party PPA.
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install android-tools-adb android-tools-fastboot
2) Replace the copy of 'adb' and 'fastboot' provided by the official Android SDK with those installed from the above step:
cp /usr/bin/adb <path-to-your-adt-sdk-package>/sdk/platform-tools/adb
cp /usr/bin/fastboot <path-to-your-adt-sdk-package>/sdk/platform-tools/fastboot
3) Restart(re-execute) your eclipse binary.
Full credits:
http://www.webupd8.org/2012/08/install-adb-and-fastboot-android-tools.html
IMPORTANT EDIT (ALTERNATE SOLUTION):
Although the above would resolve your error (and you can proceed with the Android App tutorial), as I found, ADT will also need 'aapt' (another 32-bit binary) located in:
<path-to-your-adt-sdk-package>/sdk/build-tools/android-x.x/
And unfortunately, the link that I provided above doesn't provide this binary.
So, here's my other solution:
1) Update your system
Open 'Update Manager' => 'Settings' => 'Updates
Check "Recommended Updates (precise updates)"
Update the updates that are being shown
2) Install ia32-libs
sudo apt-get install ia32-libs
And I finally was able to install 'ia32-libs'. To know why 'ia32-libs' wouldn't install in the first place, please read the answer posted by 'slangasek' here:
https://askubuntu.com/questions/136394/cannot-install-ia32-libs
On Ubuntu 12.10 x86_64 the package to run 32bits are ia32-libs and ia32-libs-multiarch.
If you type
file adb
You'll see that adb is a 32 bit file on a 64 bit system. You need the ia32 packages to emulate and run this file. But you can't!
The problem right now is you cannot download these packages, they're trying to convert it to something I guess x86_64. Here you can read about convert in the package NEWS:
summary of the conversion:
"ia32-libs (20090808ubuntu27) precise; urgency=low
ia32-libs is now a transitional package depending on
ia32-libs-multiarch,
the i386-only package which depends on all the 32-bit library packages
previously included in ia32-libs itself. As a result, ia32-libs will be
uninstallable for some time during the precise cycle, while the dependent
libraries are updated to be coinstallable using multiarch. Developers
are encouraged to help with the conversion process for these libraries,
described at:
http://wiki.debian.org/Multiarch/Implementation
-- Steve Langasek "
So if you try to edit your source.list file to grab it from older repo you'll break packages. So ubuntu 12.10 people have to wait or adb is compile or whatever to 64 bit.
edit:
Debian 7.0 will support multiarch where x64 version can run x32 binary.
source: http://www.debian.org/News/2013/20130504
I use debian_x64
add i386 lib
dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
ldd /home/yourname/adt-bundle-linux-x86_64-20130729/sdk/platform-tools/adb
when you found “android-sdks/build-tools/17.0.0/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory”
you can try
sudo apt-get install ia32-libs
sudou apt-get install zlib.i686
restart your computer
and try again
unzip that file with this:
sudo tar xvfz adt-bundle-linux-x86.zip -C /opt/android
than run that code:
sudo chown -R your_user_name /opt/android
i think it will work

Android adb not found

When I run my android app from eclipse, I get this error.
Unexpected exception 'Cannot run program "/home/antz/Development/adt-bundle-linux/sdk/platform-tools/adb": error=2 No such file or directory' while attempting to get adb version from /home/antz/Development/adt-bundle-linux/sdk/platform-tools/adb
COPY PASTE FROM Eclipse Error
[2012-11-26 13:43:08 - adb] Unexpected exception 'Cannot run program "/home/antz/Development/adt-bundle-linux/sdk/platform-tools/adb": error=2, No such file or directory' while attempting to get adb version from '/home/antz/Development/adt-bundle-linux/sdk/platform-tools/adb'
However my adb is exactly in the location where it says it's not.
What is wrong and how do I fix this?
I cd into the directory where adb is (/home/antz/Development/adt-bundle-linux/sdk/platform-tools/) and I typed in adb and it says
antz#antz-90X3A:~/Development/adt-bundle-linux/sdk/platform-tools$ ls
aapt aidl dexdump fastboot llvm-rs-cc renderscript
adb api dx lib NOTICE.txt source.properties
antz#antz-90X3A:~/Development/adt-bundle-linux/sdk/platform-tools$ adb
bash: /home/antz/Development/adt-bundle-linux/sdk/platform-tools/adb: No such file or directory
adb is green which means its an executable, correct?
for example, dx is also green and when I typed in dx into the command prompt, it works... whats wrong with adb?
On Linux, Android SDK platform-tools package containing adb used to be 32bit. It worked fine on 32bit systems. But on 64bit systems you need to manually install the IA32 library.
For Debian based distributions try this:
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
But since v24.0 platform-tools contains only 64bit binaries - so 32bit libraries no longer required.
You can no longer install ia32-libs, so you must the individual 32 bit libraries needed by adb
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
And for Ubuntu 13.10:
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1
You have to install the 32 bit glibc:
in Fedore 64 bit machine
# yum install glibc.i686
This removes the misleading 'no such file or directory' message when trying to execute a 32 bit binary. With that the 64 bit Fedora system is capable of executing 64 bit binaries.
This also removes the misleading 'not a dynamic executable' message of ldd when calling ldd on a 32 bit dynamic executable.
Now you have to install missing 32 bit libraries the binaries under adt-bundle-linux/sdk/platform-tools are linked against:
# yum install zlib.i686 libstdc++.i686 ncurses-libs.i686 libgcc.i686
Thats it.
I'm using Ubuntu 14.04 LTS 64-bit and the following code works for me;
sudo apt-get install lib32z1 lib32z1-dev
sudo apt-get install lib32stdc++6
Summary:
After I tried apt-get install ia32-libs, but apt package tool suggest that;
Package ia32-libs is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or is only available from another source.
However the following packages replace it:
lib32z1 lib32ncurses5 lib32bz2-1.0
Then the above code works for me.
This works great in Ubuntu 13.04 64bit version
You can no longer install ia32-libs, so you must the individual 32 bit libraries needed by adb
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
On Arch linux:
Enable the "multiarch" repositories in /etc/pacman.conf
then run:
root#box#pacman -Syu
root#box#pacman -S lib32-glibc lib32-zlib lib32-libstdc++5 lib32-ncurses lib32-gcc-libs
I am running Ubuntu 12.04 LTS and this command is the only thing that worked for me:
sudo apt-get install lib32z1 lib32z1-dev
Once I ran that from a command line, I was able to get the R.java file to generate (the tell-tale sign that something in your Android SDK tools installation is not quite right) by doing a Project > Clean in Eclipse.
For multiarch Debian 7.0, add:
dpkg --add-architecture i386
apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
On Fedora 17 or 18:
sudo yum install redhat-lsb.i686
You need to install the ia32-libs (IA32 libraries) package for this to work.
I did it in my Linux Mint 12:
chmod +x PATH/adb
if you're having this problem in 64bits, try this (worked for me):
$ apt-get install lib32gcc1 libc6-i386 lib32z1 lib32stdc++6
$ apt-get install lib32ncurses5 lib32gomp1 lib32z1-dev lib32bz2-dev
$ apt-get install g++-multilib
http://sixarm.com/about/ubuntu-apt-get-install-ia32-for-32-bit-on-64-bit.html
From the Ubuntu Multiarch HOWTO:
Some users using the Android SDK might encounter problems when trying to run build-tools or platform-tools on amd64 bit platform. As replacement for ia32-libs, users should be fine just installing the following libraries:
dpkg --add-architecture i386
aptitude update
aptitude install libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386
Install these libraries in linux apt-get install ia32-libs
Run these commands below. Its worked for me
sudo apt-get dist-upgrade
sudo apt-get install ia32-libs
in ubuntu 64 bits [12.04]-[14.10] and Elementary OS 64 bits
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libncurses5:i386 libstdc++6:i386 zlib1g:i386
Sometimes it's just a matter giving sdk files the necessary permissions.
sudo chmod -R +x /path/to/android-sdk-linux
Restart Android Studio and see if that fix it.
Permission issues typically occur when you copy/move sdk files from a NTFS partition or copying from another computer.
sudo apt install adb
adb not installed in your pc
Try this.
http://abhinavasblog.blogspot.sg/2013/10/working-with-ubuntu-1304-and-1310-java.html
the blog explain resolution to Ubuntu 13.10 for installing Chrome, Java and Fixing Android SDK.
The correct current combo for Arch Linux is as follows: :
[This part is unchanged] Uncomment the following section in /etc/pacman.conf:
...
[multilib]
Include = /etc/pacman.d/mirrorlist
...
Then:
sudo pacman -Syu && sudo pacman -S multilib/lib32-libstdc++5 multilib/lib32-zlib
The difference with the other answer is that package names include the multilib/ part now.
(from Arch Wiki: Multilib#Enabling, Android#Troubleshooting)

Categories

Resources