Closed liuhewei closed 11 months ago
We used to add --disable-ipv6 automatically, because I had build issues (probably the same as this), but haven't had that for a long time. I'm not sure how to fix it. Maybe there is a dependency package missing.
Feels like you don't have build-essential
or similar to me
...
checking for g++... no
...
I am new to Kivy and Buildozer and I am experiencing the same issue with my Kivy app build for Android. OS: Ubuntu: 18.04, Kivy 1.11.1, Python 3.6.9. How and where do I use "--disable-ipv6"? Is this on the ubuntu os that I am using?
Also installed dependencies as follows: sudo apt-get install -y build-essential ccache git zlib1g-dev python3 python3-dev libncurses5:i386 libstdc++6:i386 zlib1g:i386 openjdk-8-jdk unzip ant ccache autoconf libtool
But the same error persists.
Following is my spec file:
[app]
(str) Title of your application title = SIVA Social Assistant
(str) Package name package.name = SIVA
(str) Package domain (needed for android/ios packaging) package.domain = org.strootaay
(str) Source code where the main.py live source.dir = .
(list) Source files to include (let empty to include all the files)
(list) List of inclusions using pattern matching
(list) Source files to exclude (let empty to not exclude anything)
(list) List of directory to exclude (let empty to not exclude anything)
(list) List of exclusions using pattern matching
(str) Application versioning (method 1) version = 1.1
(str) Application versioning (method 2) version.regex = version = '"['"] version.filename = %(source.dir)s/main.py (list) Application requirements comma separated e.g. requirements = sqlite3,kivy requirements = python3==3.6.9,kivy,android,kivmob,jnius,mysql_connector,pysftp,tweepy,openssl
(str) Custom source folders for requirements Sets custom source for any requirements with recipes requirements.source.kivy = ../../kivy (str) Presplash of the application
(str) Icon of the application
icon.filename = sivaicon.png
(str) Supported orientation (one of landscape, sensorLandscape, portrait or all) orientation = all
(list) List of service to declare
OSX Specific author = © Copyright Info change the major version of python used by the app osx.python_version = 3
Kivy version to use osx.kivy_version = 1.11.1
Android specific (bool) Indicate if the application should be fullscreen or not fullscreen = 0
(string) Presplash background color (for android toolchain) Supported formats are: #RRGGBB #AARRGGBB or one of the following names: red, blue, green, black, white, gray, cyan, magenta, yellow, lightgray, darkgray, grey, lightgrey, darkgrey, aqua, fuchsia, lime, maroon, navy, olive, purple, silver, teal.
(string) Presplash animation using Lottie format. see https://lottiefiles.com/ for examples and https://airbnb.design/lottie/ for general documentation. Lottie files can be created using various tools, like Adobe After Effect or Synfig.
(list) Permissions
android.permissions = INTERNET, ACCESS_NETWORK_STATE
(list) features (adds uses-feature -tags to manifest)
(int) Target Android API, should be as high as possible. android.api = 27
(int) Minimum API your APK will support. android.minapi = 21
(int) Android SDK version to use
(str) Android NDK version to use android.ndk = 19c
(int) Android NDK API to use. This is the minimum API your app will support, it should usually match android.minapi.
(bool) Use --private data storage (True) or --dir public storage (False)
(str) Android NDK directory (if empty, it will be automatically downloaded.)
(str) Android SDK directory (if empty, it will be automatically downloaded.)
(str) ANT directory (if empty, it will be automatically downloaded.)
(bool) If True, then skip trying to update the Android sdk This can be useful to avoid excess Internet downloads or save time when an update is due and you just want to test/build your package android.skip_update = False (bool) If True, then automatically accept SDK license agreements. This is intended for automation only. If set to False, the default, you will be shown the license when first running buildozer. android.accept_sdk_license = False (str) Android entry point, default is ok for Kivy-based app
(str) Android app theme, default is ok for Kivy-based app android.apptheme = "@android:style/Theme.NoTitleBar" (list) Pattern to whitelist for the whole project
(str) Path to a custom whitelist file
(str) Path to a custom blacklist file
(list) List of Java .jar files to add to the libs so that pyjnius can access their classes. Don't add jars that you do not need, since extra jars can slow down the build process. Allows wildcards matching, for example: OUYA-ODK/libs/*.jar
(list) List of Java files to add to the android project (can be java or a directory containing the files)
(list) Android AAR archives to add
(list) Gradle dependencies to add
android.gradle_dependencies ='com.google.firebase:firebase-ads:10.2.0'
(list) add java compile options this can for example be necessary when importing certain java libraries using the 'android.gradle_dependencies' option see https://developer.android.com/studio/write/java8-support for further information android.add_compile_options = "sourceCompatibility = 1.8", "targetCompatibility = 1.8" (list) Gradle repositories to add {can be necessary for some android.gradle_dependencies} please enclose in double quotes e.g. android.gradle_repositories = "maven { url 'https://kotlin.bintray.com/ktor' }"
(list) packaging options to add see https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.PackagingOptions.html can be necessary to solve conflicts in gradle_dependencies please enclose in double quotes e.g. android.add_packaging_options = "exclude 'META-INF/common.kotlin_module'", "exclude 'META-INF/*.kotlin_module'"
(list) Java classes to add as activities to the manifest.
(str) OUYA Console category. Should be one of GAME or APP If you leave this blank, OUYA support will not be enabled
(str) Filename of OUYA Console icon. It must be a 732x412 png image.
(str) XML file to include as an intent filters in tag
(str) launchMode to set for the main activity
(list) Android additional libraries to copy into libs/armeabi
(bool) Indicate whether the screen should stay on Don't forget to add the WAKE_LOCK permission if you set this to True
(list) Android application meta-data to set (key=value format)
android.meta_data = com.google.android.gms.ads.APPLICATION_ID={ca-app-pub-7061078645805426~9062655818}
(list) Android library project to add (will be added in the project.properties automatically.)
(list) Android shared libraries which will be added to AndroidManifest.xml using tag
(str) Android logcat filters to use
(bool) Copy library instead of making a libpymodules.so
(str) The Android arch to build for, choices: armeabi-v7a, arm64-v8a, x86, x86_64 android.arch = armeabi-v7a
(int) overrides automatic versionCode computation (used in build.gradle) this is not the same as app version and should only be edited if you know what you're doing android.numeric_version = 1 (bool) enables Android auto backup feature (Android API >=23) android.allow_backup = True
(str) XML file for custom backup rules (see official auto backup documentation) android.backup_rules = Python for android (p4a) specific (str) python-for-android fork to use, defaults to upstream (kivy)
(str) python-for-android branch to use, defaults to master p4a.branch = master
(str) python-for-android git clone directory (if empty, it will be automatically cloned from github)
(str) The directory in which python-for-android should look for your own build recipes (if any)
(str) Filename to the hook for p4a
(str) Bootstrap to use for android builds p4a.bootstrap = sdl2 (int) port number to specify an explicit --port= p4a argument (eg for bootstrap flask)
Control passing the --use-setup-py vs --ignore-setup-py to p4a "in the future" --use-setup-py is going to be the default behaviour in p4a, right now it is not Setting this to false will pass --ignore-setup-py, true will pass --use-setup-py NOTE: this is general setuptools integration, having pyproject.toml is enough, no need to generate setup.py if you're using Poetry, but you need to add "toml" to source.include_exts.
iOS specific (str) Path to a custom kivy-ios folder
Alternately, specify the URL and branch of a git checkout: ios.kivy_ios_url = https://github.com/kivy/kivy-ios ios.kivy_ios_branch = master
Another platform dependency: ios-deploy Uncomment to use a custom checkout
Or specify URL and branch ios.ios_deploy_url = https://github.com/phonegap/ios-deploy ios.ios_deploy_branch = 1.10.0
(bool) Whether or not to sign the code ios.codesign.allowed = false
(str) Name of the certificate to use for signing the debug version Get a list of available identities: buildozer ios list_identities
(str) Name of the certificate to use for signing the release version
[buildozer]
(int) Log level (0 = error only, 1 = info, 2 = debug (with command output)) log_level = 2
(int) Display warning if buildozer is run as root (0 = False, 1 = True) warn_on_root = 1
List as sections You can define all the "list" as [section:key]. Each line will be considered as a option to the list. Let's take [app] / source.exclude_patterns. Instead of doing:
This can be translated into:
Profiles You can extend section / key with a profile For example, you want to deploy a demo version of your application without HD content. You could first change the title to add "(demo)" in the name and extend the excluded directories to remove the HD content.
Then, invoke the command line with the "demo" profile:
After several rounds of permutation and combinations of building my spec file, I changed the requirements as follows:
requirements = python3,kivy,android,kivmob,jnius,mysql_connector,pysftp,tweepy,openssl
Essentially, I removed the version specific requirement of python3==3.6.9 and the apk was successfully generated but the app did not get launched on my android phone. The Kivy splash screen appears and then the app crashes. Any suggestion? Am I doing something wrong by specifying the exact version of Python 3.6.9??? Please advise.
👋 @liuhewei, we use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please use our support channels to get help with the project. Let us know if this comment was made in error, and we'll be happy to reopen the issue.
Versions
Description
There is a Fatal error when I'm running
buildozer -v android debug
:I've changed the
/etc/gai.conf
file to prefer IPV4 over IPV6, but it doesn't works.And I don't know how to configure the
--disable-ipv6
for building hostpython3. Please help, thanks !buildozer.spec
Command:
Spec file:
Logs