I've installed kivy (on debian jessie / python 2.7), and the examples work fine,
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y build-essential ccache git zlib1g-dev python2.7 python2.7-dev
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
sudo pip install colorama appdirs sh jinja2 six
sudo pip install --upgrade colorama
sudo apt-get install pkg-config autoconf automake libtool
sudo apt-get install software-properties-common
sudo apt-get install cython #installs 0.21.1
sudo add-apt-repository ppa:kivy-team/kivy
sudo apt-get update
sudo apt-get install python-kivy python-kivy-examples #installs 1.8.0
sudo chmod -R 777 /usr/share/kivi-examples/ #install made it Read-Only Root
sudo pip install --upgrade buildozer #installs 0.32
sudo easy_install buildozer #just in case?
sudo pip install python-for-android #0.4?
java -version #reports 1.8.0_121
but when I try to buildoze any of the kivy-examples it has an error. I've set the log_level = 2 in the .spec file, but I don't see anything in the console output that suggests what could be the problem
/usr/share/kivy-examples/demo/touchtracer$ buildozer init
...
/usr/share/kivy-examples/demo/touchtracer$ buildozer -v android debug
/usr/share/kivy-examples/demo/touchtracer$ buildozer -v android_new debug
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: com/android/utils/ILogger
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: com.android.utils.ILogger
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more
# Command failed: /home/guest/.buildozer/android/platform/android-sdk-20/tools/android list sdk -u -e
#
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
Also, at some point while I was trying to build, it was downloading the android sdk every time I ran buildozer, but now that stopped.. or at least it's not not getting to that point anymore.
Is it possible that upgrading to python 3 then installing python3-kivy will solve this? I noticed my current install did not grab the latest (kivy 1.9.1 / android sdk 21)
[Update #1] I installed newer versions of buildozer (.33dev), cython (25.2), and kivy (1.9.2.dev0)
cd ~
git clone https://github.com/kivy/buildozer.git
cd buildozer
sudo python setup.py install
cd ..
sudo pip install Cython==0.25.2 #kivy 1.9.2.dev0 required Cython >= 0.23
git clone https://github.com/kivy/kivy
cd kivy
sudo python setup.py install
and updated the .spec file :
requirements = python2,kivy==master
android.sdk = 24
but still no luck. The only other thing I could find to try is to downgrade java8 to java7. Does buildoze not work with 8?
Buildozer command failed
[Update #2] I uninstalled Java8 ( https://askubuntu.com/questions/84483/how-to-completely-uninstall-java ) and installed Java 1.7.0_80 but I get the same exact error
sudo apt-get install oracle-java7-installer
java -version
sudo apt-get install oracle-java7-set-default
sudo update-alternatives --config java
BuilDozer is obsolete as of now. Forget it. I am stuck with it as asked here: Buildozer gives error upon building Pong app of Kivy framework for android publishing
Try Python for Android or QPython
I am using 64 bit operating system(ubuntu 15.04) and I am also new in linux platform.
When I try to install android studio I got an error "Unable to run mksdcard SDK tool".
I try this one and it does not work:
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6
Can u help me?
You only need to install lib32stdc++6. Try the following command:
sudo apt-get install lib32stdc++6
Use this
sudo apt-get install lib32stdc++6
For Ubuntu 15.04,15.10,16.04 LTS & Debian 8
I have tried for a lot times, but failed.
The Problem Details: I used these commands
sudo apt-add-repository ppa:paolorotolo/android-studio
sudo apt-get update
sudo apt-get install android-studio
When i command the first line into the terminal it didn't notice me to getting any error. But after commanding the second line it got error..
There is the screenshot of that Error ...
The official distribution of Android Studio can be downloaded here. You're trying to use an unofficial repository maintained by someone from the community; there is absolutely no guarantee that it's going to work. Please consider downloading the official distribution instead.
So, first you want to make sure your Java is properly installed. You can do this manually or with a PPA.
Manual Method:
Get rid of the Open JDK that may be installed:
sudo apt-get update && apt-get remove openjdk*
Download Oracle JDK from here. You are looking for a linux version
with tar.gz extension. Also choose the right version from 32-bit
(x86) and 64bit (x64) one.
sudo mkdir -p /opt/java
Move the unzipped download to where it will live (I put the version
number in this example):
sudo mv jdk1.8.0_91 /opt/java
Make this JDK your system's default:
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/jdk1.8.0_91/bin/java" 1
sudo update-alternatives --set java /opt/java/jdk1.8.0_91/bin/java
Finally, test your Java version:
java -version
PPA Method:
Get rid of the Open JDK that may be installed:
sudo apt-get update && apt-get remove openjdk*
ADD PPA
sudo add-apt-repository ppa:webupd8team/java
UPDATE
sudo apt-get update
INSTALL
sudo apt-get install oracle-java8-installer
Now Install Android Studio - either manually or via PPA:
Manual Method:
Download android studio:
Get it from http://developer.android.com/sdk/installing/studio.html#download then untar it under /opt/android-studio (recommended).
Launch it!
run ./studio.sh in the /opt/android-studio/bin directory. This will launch the setup and download all the SDKs and other necessary files on your first run, and this is what you will do to launch in the future. Just make a shortcut :)
PPA Method:
ADD PPA
sudo add-apt-repository ppa:paolorotolo/android-studio
UPDATE
sudo apt-get update
INSTALL
sudo apt-get install android-studio
NOTE: This PPA is maintained by Google, not just "someone from the community"
I installed Android SDK in order to root my android phone, using script obtained thus:
wget http://linuxundich.de/static/android_sdk_installer.sh
chmod +x android_sdk_installer.sh
sudo ./android_sdk_installer.sh
(on my system: sudo /home/xxx/android_sdk_installer.sh)
Next, I also installed "android-tools" package (adb and fastboot) in 64-bit Ubuntu 12.04 from WebUd8 ( http://www.webupd8.org/2012/08/install-adb-and-fastboot-android-tools.html):
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get install android-tools-adb android-tools-fastboot
Then I used:
sudo apt-get install android-tools-fsutil
to backport the Ubuntu Raring builds to Ubuntu 12.04
Just discovered the packages (android-tools, adb and sdk) take too much valuable space and would like to remove them, together with all associated packages.
Need comprehensive guide.
Thanks.
PS.
I can provide the text of shell script android_sdk_installer.sh, though it may also be obtained from link above.
try
sudo apt-get purge android-tools-adb
Uninstall android-tools-adb and it's dependencies
sudo apt-get purge --auto-remove android-tools-adb
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)