-
Notifications
You must be signed in to change notification settings - Fork 523
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 0.40.dev0, Buildozer 0.39] AttributeError: 'Buildozer' object has no attribute 'translate_target' #812
Comments
Thank you for the bug report, looks like a bug we've introduced in #806 |
@AndreMiras Noted, thanks. |
I'm with the same problem... |
This should be fixed in master via #821 pip install --upgrade /~https://github.com/kivy/buildozer/archive/afebba5.zip |
I ran this code: pip install --upgrade /~https://github.com/kivy/buildozer/archive/afebba5.zip But, ununfortunately, it keeps showing this message: Traceback (most recent call last): |
Yes true story, let me reopen. But in reality you have two other problem |
I'm using the demo code of kivy installation. From that folder I execute this: "buildozer init" And then: "buildozer android debug deploy run" And yes I think that the main problem is that I'm trying to run buildozer on windows 10. Do you think that run in a virtual machine with buildozer is going to fix it? Thank you in advance! |
OK could you share the full log including the command line you're typing please? |
Of Course!
|
AndreMiras, Unfortunately, the same error occur in VM Buildozer/Kivy...
I really appreciate the solution for this problem. :`( |
Yes last release had that bug. Give it a try on |
I'm so sorry for the late in reporting the current situation on that problem. As you said, we have to use the command: "buildozer android debug". And the main problem was that when we use the command "buildozer init" the file created has not the complete requirements filled correctly. So, when I was build the Showcase project it didn't work properly in the Android. The solution was to fill the field 'requirements' with the dependencies that were lacking. As a sugestion I would say to you to update the tutorials because that would finish with the doubts in general of the community. |
@erickvinsan what did you have to add to the file to make it work? thx |
I got the same problem, but has not figured out what you meant with complete the requirements. What did you do? |
@powercat and @capathida can you show the output of your |
Me to same error .My first app |
@Diwahar00 nothing we can help with if you don't provide any debug info |
…teError_translate_target Handles unknown command/target error gracefully, closes #812
Should be fixed in master with recent commit.
If you have a similar error, please make a bug report with full debug log, including the proof that you're running on master. |
Just missing out is that buildozer.spec only works on linux (Ubuntu). |
I've never played with it, but there's now a Linux shell on Windows. You could give it a try. Good luck 💪 |
@AndreMiras Thanks bro but I will install a virtual machine and play ubuntu on it, thanks for the answer! |
@AndreMiras I ran into somewhat similar problem, I used 'buildozer init' edited the spec file and ran 'buildozer android debug' and this error followed |
Yes you need to pip install the lastest version of buildozer from github master. This fix is not in the pypi release |
@AndreMiras so I installed the version you asked for and now I'm getting "Unknown command/target android". Is there something that I'm doing wrong ? |
Without you sharing the command you ran it's not really easy to help. Please share full command and output. But please do on the Discord chat since we're hijacking this ticket with something unrelated |
@AndreMiras Can you send me a link to discord channel ? |
I am facing the same problem. 'Buildozer' object has no attribute 'translate_target' Then i updated it using |
Yes you should go to Ubuntu or use the WSL, we don't support Windows anymore |
i had the same problem, but had resolved. the command 'buildozen android_new debug' is work at first. after i upgrade the 'pip' and 'buildozen', it become unwork and display the error message"'Buildozer' object has no attribute 'translate_target' ". so i use another command 'buildozer android debug |
hey guys i am with same prob plz help me..!! note that i use ubuntu 18.04 |
Can't help without more info. We need the complete stacktrace, plus buildozer version at minimum |
I assume buildozer shouldn't work on other Linux versions like Manjaro? |
No, it should, but we can't try and maintain every distribution, even all the popular ones, mostly ubuntu and arch linux are used by the developpers, so it should work on them, but you are welcome to contribute fixes if it doesn't work on a distribution you use. |
Some of the dependancies are missing in pamac. Do you think this may cause translate_target not found error? |
Please create a dedicated issue with full stacktrace so we can help. The issue you're hijacking was about Windows which we don't support anymore. But like tshirtman said, even though non of the dev nor CI have Manjaro, it should still work on most of the Linux distributions. So please create an issue with stack trace as this one is different. |
Sure. I didn't notice the issue was closed. I just switched to Linux ubuntu and at this level I don't have the same issue anymore. |
the cmd shows this E:\barq apk>buildozer android debug Check configuration tokensTraceback (most recent call last): E:\barq apk> this is my spec file (str) Title of your applicationtitle = My Application (str) Package namepackage.name = barq (str) Package domain (needed for android/ios packaging)package.domain = org.test (str) Source code where the main.py livesource.dir = . (list) Source files to include (let empty to include all the files)source.include_exts = py,png,jpg,kv,txt,atlas (list) List of inclusions using pattern matchingsource.include_patterns = assets/,images/.png (list) Source files to exclude (let empty to not exclude anything)#source.exclude_exts = spec (list) List of directory to exclude (let empty to not exclude anything)source.exclude_dirs = eel,tests, bin (list) List of exclusions using pattern matching#source.exclude_patterns = license,images//.jpg (str) Application versioning (method 1)version = 0.1 (str) Application versioning (method 2)version.regex = version = '"['"]version.filename = %(source.dir)s/main.py(list) Application requirementscomma separated e.g. requirements = sqlite3,kivyrequirements = python3,kivy (str) Custom source folders for requirementsSets custom source for any requirements with recipesrequirements.source.kivy = ../../kivy(list) Garden requirements#garden_requirements = (str) Presplash of the application#presplash.filename = %(source.dir)s/data/presplash.png (str) Icon of the applicationicon.filename = %(source.dir)s/data/icon.png (str) Supported orientation (one of landscape, sensorLandscape, portrait or all)orientation = portrait (list) List of service to declare#services = NAME:ENTRYPOINT_TO_PY,NAME2:ENTRYPOINT2_TO_PY OSX Specificauthor = © Copyright Infochange the major version of python used by the apposx.python_version = 3 Kivy version to useosx.kivy_version = 1.9.1 Android specific(bool) Indicate if the application should be fullscreen or notfullscreen = 0 (string) Presplash background color (for new 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.#android.presplash_color = #FFFFFF (list) Permissionsandroid.permissions = INTERNET (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#android.sdk = 20 (str) Android NDK version to use#android.ndk = 17c (int) Android NDK API to use. This is the minimum API your app will support, it should usually match android.minapi.#android.ndk_api = 21 (bool) Use --private data storage (True) or --dir public storage (False)#android.private_storage = True (str) Android NDK directory (if empty, it will be automatically downloaded.)#android.ndk_path = (str) Android SDK directory (if empty, it will be automatically downloaded.)#android.sdk_path = (str) ANT directory (if empty, it will be automatically downloaded.)#android.ant_path = (bool) If True, then skip trying to update the Android sdkThis can be useful to avoid excess Internet downloads or save timewhen an update is due and you just want to test/build your packageandroid.skip_update = False(bool) If True, then automatically accept SDK licenseagreements. This is intended for automation only. If set to False,the default, you will be shown the license when first runningbuildozer.android.accept_sdk_license = False(str) Android entry point, default is ok for Kivy-based app#android.entrypoint = org.renpy.android.PythonActivity (list) Pattern to whitelist for the whole project#android.whitelist = (str) Path to a custom whitelist file#android.whitelist_src = (str) Path to a custom blacklist file#android.blacklist_src = (list) List of Java .jar files to add to the libs so that pyjnius can accesstheir classes. Don't add jars that you do not need, since extra jars can slowdown the build process. Allows wildcards matching, for example:OUYA-ODK/libs/*.jar#android.add_jars = foo.jar,bar.jar,path/to/more/*.jar (list) List of Java files to add to the android project (can be java or adirectory containing the files)#android.add_src = (list) Android AAR archives to add (currently works only with sdl2_gradlebootstrap)#android.add_aars = (list) Gradle dependencies to add (currently works only with sdl2_gradlebootstrap)#android.gradle_dependencies = (list) Java classes to add as activities to the manifest.#android.add_activites = com.example.ExampleActivity (str) python-for-android branch to use, defaults to master#p4a.branch = master (str) OUYA Console category. Should be one of GAME or APPIf you leave this blank, OUYA support will not be enabled#android.ouya.category = GAME (str) Filename of OUYA Console icon. It must be a 732x412 png image.#android.ouya.icon.filename = %(source.dir)s/data/ouya_icon.png (str) XML file to include as an intent filters in tag#android.manifest.intent_filters = (str) launchMode to set for the main activity#android.manifest.launch_mode = standard (list) Android additional libraries to copy into libs/armeabi#android.add_libs_armeabi = libs/android/.so (bool) Indicate whether the screen should stay onDon't forget to add the WAKE_LOCK permission if you set this to True#android.wakelock = False (list) Android application meta-data to set (key=value format)#android.meta_data = (list) Android library project to add (will be added in theproject.properties automatically.)#android.library_references = (str) Android logcat filters to use#android.logcat_filters = *:S python:D (bool) Copy library instead of making a libpymodules.so#android.copy_libs = 1 (str) The Android arch to build for, choices: armeabi-v7a, arm64-v8a, x86android.arch = armeabi-v7a Python for android (p4a) specific(str) python-for-android git clone directory (if empty, it will be automatically cloned from github)#p4a.source_dir = (str) The directory in which python-for-android should look for your own build recipes (if any)#p4a.local_recipes = (str) Filename to the hook for p4a#p4a.hook = (str) Bootstrap to use for android buildsp4a.bootstrap = sdl2(int) port number to specify an explicit --port= p4a argument (eg for bootstrap flask)#p4a.port = iOS specific(str) Path to a custom kivy-ios folder#ios.kivy_ios_dir = ../kivy-ios Alternately, specify the URL and branch of a git checkout:ios.kivy_ios_url = /~https://github.com/kivy/kivy-ios Another platform dependency: ios-deployUncomment to use a custom checkout#ios.ios_deploy_dir = ../ios_deploy Or specify URL and branchios.ios_deploy_url = /~https://github.com/phonegap/ios-deploy (str) Name of the certificate to use for signing the debug versionGet a list of available identities: buildozer ios list_identities#ios.codesign.debug = "iPhone Developer: ()" (str) Name of the certificate to use for signing the release version#ios.codesign.release = %(ios.codesign.debug)s [buildozer] (int) Log level (0 = error only, 1 = info, 2 = debug (with command output))log_level = 1 (int) Display warning if buildozer is run as root (0 = False, 1 = True)warn_on_root = 1 (str) Path to build artifact storage, absolute or relative to spec filebuild_dir = ./.buildozer(str) Path to build output (i.e. .apk, .ipa) storagebin_dir = ./bin-----------------------------------------------------------------------------List as sectionsYou 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:#[app] This can be translated into:#[app:source.exclude_patterns] -----------------------------------------------------------------------------ProfilesYou can extend section / key with a profileFor example, you want to deploy a demo version of your application withoutHD content. You could first change the title to add "(demo)" in the nameand extend the excluded directories to remove the HD content.#[app@demo] #[app:source.exclude_patterns@demo] Then, invoke the command line with the "demo" profile:#buildozer --profile demo android debug runnig in windows7 32bit |
I am running buildozer on windows 10 How to resolve this. Plz help |
Versions
Description
I couldn't build my first app and even update orother commands due to an error: AttributeError: 'Buildozer' object has no attribute 'translate_target'.
Thanks in advanced. 👍
buildozer.spec
Command:
Spec file:
Logs
The text was updated successfully, but these errors were encountered: