sahil_143
sahil_143

Reputation: 251

Buildozer failed to execute the last command

while I was trying to build,push and automatically run the apk on my device using buildozer android debug deploy run it shows these errors:

# Check configuration tokens 

# Ensure build layout

# Check configuration tokens

# Preparing build


# Check requirements for android
# Install platform
# Apache ANT found at /home/sahil/.buildozer/android/platform/apacheant-1.9.4
# Android SDK found at /home/sahil/.buildozer/android/platform/android-sdk-21
# Android NDK found at /home/sahil/.buildozer/android/platform/android-ndk-r9c
# Check application requirements
# Check garden requirements
# Compile platform
# Distribution already compiled, pass.
# Build the application #21
# Package the application
 # Command failed: /usr/bin/python2.7 build.py --name demo --version 1.2.0 --package org.test.myapp --private /home/sahil/kivy/.buildozer/android/app --sdk 14 --minsdk 8 --orientation landscape debug
# 
# Buildozer failed to execute the last command
# If the error is not obvious, please raise the log_level to 2
# and retry the latest command.
# In case of a bug report, please add a full log with log_level = 2

I checked it out in documentation and also on internet but did not find anything about it. AND I am just making a simple Hello World application:

#version.regex
#__version__= '1.0'

from kivy.app import App
from kivy.uix.label import Label


class SimpleApp(App):
    def build(self):
        return Label(text="Hello World")


if __name__=="__main__":
    SimpleApp().run()

Thanks!

Upvotes: 9

Views: 28413

Answers (3)

qeohoa
qeohoa

Reputation: 3

Sorry for may English but would that help if in Folder that App is made (example: your_user@your_user-virtualbox:~/Your_Desktop/(App_Folder_Name)$ ) with pygame or kivy module in Linux OS you would have 1 main.py file and buildozer.spec constructed with command buidozer init (your_user@your_user-virtualbox:~/Your_Desktop/(Your_App_Folder_Name)$buildozer init). For the fisrt time that you only should change is in (

# (list) Application requirements
# comma separated e.g. requirements = sqlite3,kivy
requirements = python3,pygame,jnius,sdl2,sdl2_image,sdl2_mixer,sdl2_ttf,png,jpeg

) you need add requirements, save the file and close it. Than in Your_App_folder with main.py and buildozer.spec you need download every module that you use trought import in main.py using terminal pip3 install pygame (example:

your_user@your_user-virtualbox:~/Your_Desktop/(Your_App_Folder_Name)$pip3 install pygame

) and etc. even if the error by download occure better to do that and then install next module but you need a Internet connection even to build App with buildozer and for the first time lets say to wait 30 minutes or more that everything is executed and you get at the end in terminal something similar like:

# Android packaging done!
# APK myapp-0.1-arm64-v8a_armeabi-v7a-debug.apk available in the bin directory                                                                            
your_user@your_user-virtualbox:~/Desktop/a$

if that would not work than you have other problems maybe update, upgrade or reinstall everything and install new. You can use Ubuntu, Lubuntu, etc. and maybe use VirtualBox too.

Do Not Forget to have Internet Connection and install with Terminal every Module in Your_App_folder with pip.

Upvotes: 0

sahil_143
sahil_143

Reputation: 251

First raise the log level = 2 in buildozer.spec,then it will show all logs and error clearly. Here in .buildozer/android/platform/python-for-android/dist/myapp/python 2.7 build.py was missing. To fix this issue run this command buildozer android clean and then rebuild it using buildozer android debug or automatically run using buildozer android debug deploy run.

Upvotes: 12

Theswolf
Theswolf

Reputation: 61

Probably you are running an updated version of cython, all major release start form 0.21 and up, you have to downgrade cython to 0.20 ( sudo pip install cython==0.20 ) then removing .buildozer folder ( rm -Rf .buildozer ) and then rebuilding with 'buildozer android debug'

Upvotes: 4

Related Questions