Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buildozer does not install build tools automatically with fresh install #146

Closed
chozabu opened this issue Sep 26, 2014 · 56 comments
Closed
Labels

Comments

@chozabu
Copy link
Contributor

chozabu commented Sep 26, 2014

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.

@chozabu
Copy link
Contributor Author

chozabu commented Sep 26, 2014

Sorry about the lack of logs or extra info on this issue!

The relevant area of code looks to be around here:

v_build_tools = self._read_version_subdir(

@kived kived added the bug label Sep 26, 2014
@kived
Copy link
Contributor

kived commented Sep 27, 2014

Workaround - install build-tools manually.

  1. Run ~/.buildozer/android/platform/android-sdk-21/tools/android to launch the Android SDK Manager.
  2. Click the Deselect All link at the bottom of the window, and check the box next to "Android SDK Build-tools -- 20".
    screenshot from 2014-09-27 13 17 13
  3. Click the Install 1 package... button.
  4. Click Accept License and then click the Install button.
    screenshot from 2014-09-27 13 19 19
  5. Close the SDK Manager and resume working with buildozer.

rogererens added a commit to rogererens/buildozer that referenced this issue Oct 8, 2014
On my system (VBox with Ubuntu64 14.04) there is no version/revision 21. Maybe it has been revoked by Google?
There is a revision 20 at this moment.
This might resolve issue kivy#146?
@odinntor
Copy link

odinntor commented Nov 6, 2014

JAISUS.. if this is the bug, i've been on this bugger for 2 full days now... :-/

@casperlehmann
Copy link

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:
screen shot 2014-11-26 at 23 15 17

@tito
Copy link
Member

tito commented Mar 8, 2015

This is fixed, please reopen the day it will break again :)

@tito tito closed this as completed Mar 8, 2015
@ghost
Copy link

ghost commented Jun 16, 2015

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:

http://wiki.labomedia.org/index.php/Kivy_Buildozer_pour_cr%C3%A9er_une_application_Android_avec_un_script_python

Through this site I found this post, I performed the described steps and the problem persists. Thank you in advance for your help.
01

@kived
Copy link
Contributor

kived commented Jul 29, 2015

It has been broke again for a while.

@elbow-jason
Copy link

This is broken as of today (27 AUG 2015).

@stuaxo
Copy link

stuaxo commented Sep 10, 2015

Bah, just hit this.

@MichaelCurrie
Copy link

@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.

@casperlehmann
Copy link

Glad you figured it out.

@stuaxo
Copy link

stuaxo commented Sep 15, 2015

So the bug is that the out-of-box experience needs to download SDK tools version 23.0 from the get go ?

@erikvanelten
Copy link

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

@evbo
Copy link

evbo commented Jan 27, 2016

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):

untitled

@evbo
Copy link

evbo commented May 19, 2016

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.

@NumesSanguis
Copy link

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

@yaki29
Copy link

yaki29 commented Nov 1, 2016

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).

@Lavz
Copy link

Lavz commented Jan 22, 2017

aidl not found , please install it

#146 yaki29 commented on Nov 1, 2016
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
aidl_error

@yaki29
Copy link

yaki29 commented Jan 22, 2017

@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.

@mrroot5
Copy link

mrroot5 commented Mar 6, 2017

I have this issue with sdk versions < 22. If you change the sdk level to version >= 22 it works.

@seisdr
Copy link

seisdr commented Jan 9, 2020

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

@VaighundaSubash
Copy link

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

@VaighundaSubash
Copy link

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

@VaighundaSubash
Copy link

How to perform "Please export ANDROID_SWT to point to the folder containing swt.jar for your platform" ?

@seisdr
Copy link

seisdr commented Jan 9, 2020

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

@VaighundaSubash
Copy link

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

@VaighundaSubash
Copy link

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

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

@seisdr
Copy link

seisdr commented Jan 9, 2020

What error you get

@VaighundaSubash
Copy link

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

@VaighundaSubash
Copy link

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

@seisdr
Copy link

seisdr commented Jan 9, 2020

Yeah make sure it exist also make sure they're not symlinlks

@VaighundaSubash
Copy link

Yeah make sure it exist also make sure they're not symlinlks

Couldn't understand

@seisdr
Copy link

seisdr commented Jan 9, 2020

ls -alth /usr/share/java/swt.jar

@VaighundaSubash
Copy link

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

@seisdr
Copy link

seisdr commented Jan 9, 2020

export ANDROID_WAT="../../lib/java/swt-gtk-3.8.2.jar"

@VaighundaSubash
Copy link

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

@seisdr
Copy link

seisdr commented Jan 9, 2020

ANDROID_SWT*
using export is to make sure it set properly otherwise you cand do android_swt=...
Without export

@VaighundaSubash
Copy link

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

@seisdr
Copy link

seisdr commented Jan 9, 2020

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

@seisdr
Copy link

seisdr commented Jan 9, 2020

Wait

@seisdr
Copy link

seisdr commented Jan 9, 2020

to the folder not the file
Try
ANDROID_SWT=/usr/share/java/

@VaighundaSubash
Copy link

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:~ $

@seisdr
Copy link

seisdr commented Jan 9, 2020

This one should work

export ANDROID_SWT=/home/pi/.buildozer/android/platform/android-sdk/tools/lib/x86/

@VaighundaSubash
Copy link

Good Improvement!!! Now I got below error,

Aidl not found, please install it

@seisdr
Copy link

seisdr commented Jan 9, 2020

I don't know about this
Maybe apt search aidl

@VaighundaSubash
Copy link

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

@AndreMiras
Copy link
Member

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

@shervinbdndev
Copy link

what should I do with this ?
"sdkmanager path "/home/shervin/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager" does not exist, sdkmanager is notinstalled"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests