A fresh clone of buildozer, attempting to build a basic application fails due to buildozer not installing build tools.
This can be worked around by waiting for buildozer to fail, browsing to buildozers android SDK installation, launching the manager and installing build tools version 20, ensuring to unmark any packages checked by default!
kived mentions it may be trying to install build tools version 21 - which does not exist.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Sorry about the lack of logs or extra info on this issue!
The relevant area of code looks to be around here: https://github.com/kivy/buildozer/blob/a7c5ccc6835f542aab6756bcb170d5b648815834/buildozer/targets/android.py#L353
Workaround - install build-tools manually.
~/.buildozer/android/platform/android-sdk-21/tools/android to launch the Android SDK Manager.Deselect All link at the bottom of the window, and check the box next to "Android SDK Build-tools -- 20".
Install 1 package... button.Accept License and then click the Install button.
JAISUS.. if this is the bug, i've been on this bugger for 2 full days now... :-/
I don't know if it makes a difference as far as fixing the bug is concerned, but in case anyone else can't seem to find build-tools 20: SDK Tools need to be updated to rev. 23.0 before they are even visible.
I was stuck here for far too long:

This is fixed, please reopen the day it will break again :)
I have the same problem with buildozer:
"subprocess.CalledProcessError: Command '['ant', 'debug']' returned non-zero exit status 1"
I'm running on Linux 64-bit, did the installation of buildozer as the following site:
Through this site I found this post, I performed the described steps and the problem persists. Thank you in advance for your help.

It has been broke again for a while.
This is broken as of today (27 AUG 2015).
Bah, just hit this.
@Laspimon how do I update SDK tools to version 23.0 as you suggest above? I'm stuck on the same screen you were.
Update: Ah, you click "Install" with what's selected by default, then restart the package manager (run ./android from that tools/ folder) and then Android SDK Build-tools 20 is available in the list.
Glad you figured it out.
So the bug is that the out-of-box experience needs to download SDK tools version 23.0 from the get go ?
I installed 20 and 23, now I get this... Now what?
BUILD FAILED
/home/erik/.buildozer/android/platform/android-sdk-21/tools/ant/build.xml:649: The following error occurred while executing this line:
/home/erik/.buildozer/android/platform/android-sdk-21/tools/ant/build.xml:655: Execute failed: java.io.IOException: Cannot run program "/home/erik/.buildozer/android/platform/android-sdk-21/build-tools/23.0.1/aidl": error=2, No such file or directory
I try following the readme you wrote on the VM desktop, but when trying to build the project, I am never successful. It asks me to update to rev 22 even though I have already (I've updated even beyond that to rev 23):

Yeah, the major issue that isn't captured in the readme is any Buildozer build MUST be run on the disk of the virtualmachine - not a shared folder with your host machine.
Still existing, I had to open ~/.buildozer/android/platform/android-sdk-21/tools/android and update around 4 times.
Ubuntu 16.04 with Python 3.5
You can also change the android.sdk = "some other version/revision" in the buildozer.spec file, it will do everything from scratch. I know it is little wierd but it worked for me ... (use it as a last option, i.e. if nothing above works for you).
You can also change the android.sdk = "some other version/revision" in the buildozer.spec file, it will do everything from scratch. I know it is little wierd but it worked for me ... (use it as a last option, i.e. if nothing above works for you).
Can you please tell me which sdk version u changed , because past two days i was trying hard to generate APK but not able to do that . finally am getting
aidl not found , please install it
Can you please tell me how to install AIDL
@Lavz Actually I don't remember, it was like 3 months ago. But this issue has been resolved why don't you reinstall the buildozer and also remove the .buildozer directory from where you installed it (probably in your home directory). Perform the same process and I suppose that would work for you.
I have this issue with sdk versions < 22. If you change the sdk level to version >= 22 it works.
Again....
I tried to make updates in the Android SDK Manager but got:
Downloading SDK Platform Android 8.1.0, API 27, revision 1
Download finished with wrong size. Expected 65606517 bytes, got 65738431 bytes.
Done. Nothing was installed.
Any ideas? Thanks in advance for help!
@Lavz What solution ended up working for you? I have the exact same error you posted above. Been stuck on it for a few days.
As of today, 6/25/2016, it all seems to be broken again.
#
And if I try:
-bash: /home/karl/.buildozer/android/platform/android-sdk-22/build-tools/19.1.0/aidl: cannot execute binary file: Exec format error
32 bits libs are all installed.
No matter if I try it on a VPS running Ubuntu 16.04 or even the VM put together by the team.
I haven't been able to build an APK for the last 3 days.
@kwag
How did you install the 32bits libs
# Check that aidl can be executed
# Search for Aidl
# Run '/home/k/.buildozer/android/platform/android-sdk-20/build-tools/0/aidl'
# Cwd None
# Aidl cannot be executed
#
# You might have missed to install 32bits libs
# Check http://buildozer.readthedocs.org/en/latest/installation.html
#
___and what is this
~/.buildozer/android/platform/android-sdk-20/tools/android
Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
at com.android.sdkmanager.Main.showSdkManagerWindow(Main.java:328)
at com.android.sdkmanager.Main.doAction(Main.java:316)
at com.android.sdkmanager.Main.run(Main.java:118)
at com.android.sdkmanager.Main.main(Main.java:101)
Please help me I'm facing below error,
b"SWT folder '/home/pi/.buildozer/android/platform/android-sdk-20/tools/lib/arm' does not exist.\nPlease export ANDROID_SWT to point to the folder containing swt.jar for your platform.\n"# Command failed: /home/pi/.buildozer/android/platform/android-sdk-20/tools/android list sdk -u -e
Please help me I'm facing below error,
b"SWT folder '/home/pi/.buildozer/android/platform/android-sdk-20/tools/lib/arm' does not exist.\nPlease export ANDROID_SWT to point to the folder containing swt.jar for your platform.\n"# Command failed: /home/pi/.buildozer/android/platform/android-sdk-20/tools/android list sdk -u -e
find / 2>&1 |grep swt.jar
Found the swt.jar files in below locations,
/home/pi/.buildozer/android/platform/android-sdk-20/tools/lib/jfreechart-1.0.9-swt.jar
/home/pi/.buildozer/android/platform/android-sdk-20/tools/lib/x86_64/swt.jar
/home/pi/.buildozer/android/platform/android-sdk-20/tools/lib/x86/swt.jar
/home/pi/.buildozer/android/platform/android-sdk/tools/lib/x86_64/swt.jar
/home/pi/.buildozer/android/platform/android-sdk/tools/lib/x86/swt.jar
/usr/share/java/swt.jar
Please help me I'm facing below error,
b"SWT folder '/home/pi/.buildozer/android/platform/android-sdk-20/tools/lib/arm' does not exist.\nPlease export ANDROID_SWT to point to the folder containing swt.jar for your platform.\n"# Command failed: /home/pi/.buildozer/android/platform/android-sdk-20/tools/android list sdk -u -efind / 2>&1 |grep swt.jar
Found the swt.jar files in below locations,
/home/pi/.buildozer/android/platform/android-sdk-20/tools/lib/jfreechart-1.0.9-swt.jar
/home/pi/.buildozer/android/platform/android-sdk-20/tools/lib/x86_64/swt.jar
/home/pi/.buildozer/android/platform/android-sdk-20/tools/lib/x86/swt.jar
/home/pi/.buildozer/android/platform/android-sdk/tools/lib/x86_64/swt.jar
/home/pi/.buildozer/android/platform/android-sdk/tools/lib/x86/swt.jar
/usr/share/java/swt.jar
How to perform "Please export ANDROID_SWT to point to the folder containing swt.jar for your platform" ?
Check what processor you have
uname -a
and then use the optimization one
export ANDROID_SWT=/home/pi/.buildozer/android/platform/android-sdk/tools/lib/x86/swt.jar
Or
export ANDROID_SWT=/usr/share/java/swt.jar
Check what processor you have
uname -a
and then use the optimization one
export ANDROID_SWT=/home/pi/.buildozer/android/platform/android-sdk/tools/lib/x86/swt.jar
Or
export ANDROID_SWT=/usr/share/java/swt.jar
I have below processor,
Linux raspberrypi 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l GNU/Linux
Check what processor you have
uname -a
and then use the optimization one
export ANDROID_SWT=/home/pi/.buildozer/android/platform/android-sdk/tools/lib/x86/swt.jar
Or
export ANDROID_SWT=/usr/share/java/swt.jarI have below processor,
Linux raspberrypi 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l GNU/Linux
Tried
export ANDROID_SWT=/home/pi/.buildozer/android/platform/android-sdk/tools/lib/x86/swt.jar
and
export ANDROID_SWT=/usr/share/java/swt.jar
Both are not working. Please suggest me
What error you get
What error you get
Still same error
b"SWT folder '/home/pi/.buildozer/android/platform/android-sdk/tools/lib/x86/swt.jar' does not exist.\nPlease export ANDROID_SWT to point to the folder containing swt.jar for your platform.\n"# Command failed: /home/pi/.buildozer/android/platform/android-sdk-20/tools/android list sdk -u -e
What error you get
Still same error
b"SWT folder '/home/pi/.buildozer/android/platform/android-sdk/tools/lib/x86/swt.jar' does not exist.\nPlease export ANDROID_SWT to point to the folder containing swt.jar for your platform.\n"# Command failed: /home/pi/.buildozer/android/platform/android-sdk-20/tools/android list sdk -u -e
After executing the command,
buildozer -v android debug
Yeah make sure it exist also make sure they're not symlinlks
Yeah make sure it exist also make sure they're not symlinlks
Couldn't understand
ls -alth /usr/share/java/swt.jar
ls -alth /usr/share/java/swt.jar
I have,
lrwxrwxrwx 1 root root 32 Mar 29 2018 /usr/share/java/swt.jar -> ../../lib/java/swt-gtk-3.8.2.jar
export ANDROID_WAT="../../lib/java/swt-gtk-3.8.2.jar"
export ANDROID_WAT="../../lib/java/swt-gtk-3.8.2.jar"
Again Buildozer throwing same error. Should we mention where to export? like source and destination path
ANDROID_SWT*
using export is to make sure it set properly otherwise you cand do android_swt=...
Without export
ANDROID_SWT*
using export is to make sure it set properly otherwise you cand do android_swt=...
Without export
Again similar error,
b"SWT folder '/usr/share/java/swt.jar' does not exist.\nPlease export ANDROID_SWT to point to the folder containing swt.jar for your platform.\n"# Command failed: /home/pi/.buildozer/android/platform/android-sdk-20/tools/android list sdk -u -e
ANDROID_SWT= ../../lib/java/swt-gtk-3.8.2.jar
and try
Show me
echo $ANDROID_SWT
and
ls -al ../../lib/java/swt-gtk-3.8.2.jar
Might be symlink
Wait
to the folder not the file
Try
ANDROID_SWT=/usr/share/java/
I'm getting below,
pi@raspberrypi:~ $ ANDROID_SWT=/usr/share/java/
pi@raspberrypi:~ $ echo $ANDROID_SWT
/usr/share/java/
pi@raspberrypi:~ $ ls -al ../../lib/java/swt-gtk-3.8.2.jar
ls: cannot access '../../lib/java/swt-gtk-3.8.2.jar': No such file or directory
pi@raspberrypi:~ $
This one should work
export ANDROID_SWT=/home/pi/.buildozer/android/platform/android-sdk/tools/lib/x86/
Good Improvement!!! Now I got below error,
Aidl not found, please install it
I don't know about this
Maybe apt search aidl
I don't know about this
Maybe apt search aidl
Thank you so much for your great support!!!
aidl is looks like installation part only. I can continue now
Yes this is definitely glitching sometimes, but most of the time it's working.
The workaround is documented in https://buildozer.readthedocs.io/en/latest/installation.html?highlight=aidl#aidl-not-found-please-install-it
Most helpful comment
JAISUS.. if this is the bug, i've been on this bugger for 2 full days now... :-/