5

When after I give the command:

buildozer android debug deploy run

I am getting the following error. Its showing syntax error ?

# Install distribute
# Run 'curl http://python-distribute.org/distribute_setup.py | venv/bin/python'
# Cwd /root/Bt/.buildozer
% Total     % Received  % Xferd   Average  Speed    Time    Time     Time  Current 
Dload Upload  Total Spent    Left Speed
100  1395  100  1395    0     0    276      0  0:00:05  0:00:05 --:--:--   276
File "<stdin>", line 1
<HTML><HEAD>
^
SyntaxError: invalid syntax
# Command failed: curl http://python-distribute.org/distribute_setup.py | venv/bin
/python
xralf
  • 3,312
  • 45
  • 129
  • 200
user
  • 87
  • 8

3 Answers3

2

It looks like this curl failed for some reason. Could you make sure your buildozer is fully up to date with git, delete your .buildozer directory, and try again?

inclement
  • 29,124
  • 4
  • 48
  • 60
2

I would try to update your Python version, make sure it is the latest.

LucioRandy
  • 220
  • 1
  • 19
  • I tried it, but didn't help $ python -V Python 3.8.0 – xralf Oct 11 '20 at 02:58
  • I would try _inclement's_ post below. – LucioRandy Oct 11 '20 at 03:36
  • Or try [this](https://github.com/kivy/buildozer/issues/1017)! – LucioRandy Oct 14 '20 at 14:14
  • now it ends with [this](https://pastebin.com/cq89izNd) error – xralf Oct 14 '20 at 14:57
  • Try [this](https://github.com/kivy/buildozer/issues/760) or [this](https://stackoverflow.com/questions/60963080/kivy-buildozer-spec-error-trying-to-build-an-android-app-that-sends-an-email-o). – LucioRandy Oct 14 '20 at 19:17
  • I couldn't downgrade buildozer, so I would try this option `option 2) do the download by hand per codingsett's comment, but make sure you have the version that buildozer expects. In my case it wants r9c. So download http://dl.google.com/android/ndk/android-ndk-r9c-linux-x86_64.tar.bz2, and unzip it into the expected location, in this case ~/.buildozer/android/platform then run buildozer again as normal.` but I need another URL. My buildozer wants this version `https://dl.google.com/android/repository/android-ndk-r19c-linux-x86.zip` I can't find the URL for r19c-linux-x86 – xralf Oct 14 '20 at 19:42
  • Check out [this](https://developer.android.com/ndk/downloads). – LucioRandy Oct 14 '20 at 20:43
  • There is only this version `https://dl.google.com/android/repository/android-ndk-r19c-linux-x86_64.zip` but my cpu is probably 32 bit (i686) . `file /lib/systemd/systemd /lib/systemd/systemd: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 3.2.0,...` – xralf Oct 15 '20 at 02:25
  • I tried it, but I have [this](https://pastebin.com/zzvecTZT) error now. [This](https://stackoverflow.com/questions/51781916/create-kivy-apk-with-buildozer-error-aidl-cannot-be-executed) didn't help, because I don't have these directories. – xralf Oct 15 '20 at 02:50
  • I tried [this](https://github.com/kivy/buildozer/issues/532) but didn't help. Probably because my directory structure is different. – xralf Oct 15 '20 at 03:32
  • This helped: `sudo apt install aidl` – xralf Oct 15 '20 at 03:39
  • But this error occured `Building libffi for armeabi-v7a [ERROR]: Build failed: Couldn't find executable for CC.` – xralf Oct 15 '20 at 03:44
  • I found [this](https://stackoverflow.com/a/59715813/653379) but don't know what to change in my case. – xralf Oct 15 '20 at 03:55
1

Don't use virtual env. I had a similar issue. Just install builddozer and kivy in the default environment

  • Without virtual env, it doesn't work as well. See LucioRandy answer. In the comment there is where I have stuck. – xralf Oct 16 '20 at 18:32
  • 1
    I will send a video link soon in here. – Vikram Rayavarapu Oct 18 '20 at 02:19
  • 1
    https://drive.google.com/drive/folders/1t2P9Wqlpa19D7z5JGQDlVLErpbvDEZHY?usp=sharing This contains the screen recording my kivy to apk conversion – Vikram Rayavarapu Oct 20 '20 at 16:27
  • Thank you. I still have [this](https://stackoverflow.com/questions/59593341/buildozer-build-failed-couldnt-find-executable-for-cc) error. – xralf Oct 20 '20 at 17:52
  • Did u install cython? And also install these dependencies. (From docs) `sudo apt install -y git zip unzip openjdk-8-jdk python3-pip autoconf libtool pkg-config zlib1g-dev libncurses5-dev libncursesw5-dev libtinfo5 cmake libffi-dev libssl-dev` `pip3 install --user --upgrade Cython virtualenv` # the --user should be removed if you do this in a venv # add the following line at the end of your ~/.bashrc file `export PATH=$PATH:~/.local/bin/` – Vikram Rayavarapu Oct 21 '20 at 18:08
  • Yes, I have cython 0.29.21. Now, I have [this](https://stackoverflow.com/questions/64468814/buildozer-c-compiler-cannot-create-executables) problem – xralf Oct 21 '20 at 18:11
  • Try installing other dependencies. Is your kivy app running fine on interpreter? – Vikram Rayavarapu Oct 21 '20 at 18:12
  • That could be the problem. The kivy app runs only in python3.6 (not python3.8). I will try to fix it. – xralf Oct 21 '20 at 18:14
  • I installed kivy from Python3.8 and the app runs, but build failed. – xralf Oct 21 '20 at 18:35