question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

android build failed with toga 0.3.0.dev8 and briefcase-template

See original GitHub issue

Expected Behavior

Following Tutorial 0 - Hello, world! from briefcase docs, I expected to get a simple app build and starting on my android phone.

Current Behavior

Instead of building and starting the app on the phone the process was interuppted by the following error.

`python setup.py android -s running android

Installation complete.

Starting App Name Starting a Gradle Daemon (subsequent builds will be faster) The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead. at build_aqb3nhg1jwcrvonfhwa4brue8.run(/home/sjuk/src/bee/appname/android/build.gradle:11) The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0. The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead. :preBuild UP-TO-DATE :preDebugBuild UP-TO-DATE :checkDebugManifest :preReleaseBuild UP-TO-DATE :prepareComAndroidSupportAnimatedVectorDrawable2511Library :prepareComAndroidSupportAppcompatV72511Library :prepareComAndroidSupportSupportCompat2511Library :prepareComAndroidSupportSupportCoreUi2511Library :prepareComAndroidSupportSupportCoreUtils2511Library :prepareComAndroidSupportSupportFragment2511Library :prepareComAndroidSupportSupportMediaCompat2511Library :prepareComAndroidSupportSupportV42511Library :prepareComAndroidSupportSupportVectorDrawable2511Library :prepareDebugDependencies :compileDebugAidl :compileDebugRenderscript :generateDebugBuildConfig :generateDebugResValues :generateDebugResources :mergeDebugResources :processDebugManifest :processDebugResources :generateDebugSources :incrementalDebugJavaCompilationSafeguard :compileDebugJavaWithJavac :compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.). Note: /home/sjuk/src/bee/appname/android/src/android/PythonActivity.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. :compileDebugNdk NO-SOURCE :compileDebugSources :buildPythonDebug Compiling app/appname/init.py … Compiling app/appname/main.py … Compiling app/appname/app.py … Writing build/intermediates/classes/debug/python/appname/init.class … Writing build/intermediates/classes/debug/python/appname/main.class … Writing build/intermediates/classes/debug/python/appname/app.class … Writing build/intermediates/classes/debug/python/appname/app/AppName.class … Traceback (most recent call last): Compiling app_packages/tests/test_implementation.py … File “/home/sjuk/env/voc/lib/python3.5/site-packages/voc/python/ast.py”, line 160, in visit super().visit(node) File “/usr/lib/python3.5/ast.py”, line 245, in visit return visitor(node) File “/home/sjuk/env/voc/lib/python3.5/site-packages/voc/python/ast.py”, line 49, in dec fn(self, node, *args, **kwargs) File “/home/sjuk/env/voc/lib/python3.5/site-packages/voc/python/ast.py”, line 1756, in visit_YieldFrom raise NotImplementedError(‘No handler for YieldFrom’) NotImplementedError: No handler for YieldFrom Compiling app_packages/tests/init.py … Compiling app_packages/tests/test_app.py … Compiling app_packages/tests/test_font.py … Compiling app_packages/tests/test_handler.py … Compiling app_packages/tests/test_command.py … Compiling app_packages/tests/test_window.py … Compiling app_packages/tests/widgets/test_webview.py … Compiling app_packages/tests/widgets/test_scrollcontainer.py … Compiling app_packages/tests/widgets/test_icon.py … Compiling app_packages/tests/widgets/test_slider.py … Compiling app_packages/tests/widgets/test_imageview.py … Compiling app_packages/tests/widgets/test_multilinetextinput.py … Compiling app_packages/tests/widgets/test_image.py … Compiling app_packages/tests/widgets/test_textinput.py … Compiling app_packages/tests/widgets/test_optioncontainer.py … Compiling app_packages/tests/widgets/init.py … Compiling app_packages/tests/widgets/test_button.py … Compiling app_packages/tests/widgets/test_tree.py … Compiling app_packages/tests/widgets/test_navigationview.py … Compiling app_packages/tests/widgets/test_passwordinput.py … Compiling app_packages/tests/widgets/test_selection.py … Compiling app_packages/tests/widgets/test_base.py … Compiling app_packages/tests/widgets/test_box.py … Compiling app_packages/tests/widgets/test_table.py … Compiling app_packages/tests/widgets/test_switch.py … Compiling app_packages/tests/widgets/test_numberinput.py … Compiling app_packages/tests/widgets/test_canvas.py … Compiling app_packages/tests/widgets/test_progressbar.py … Compiling app_packages/tests/widgets/test_detailedlist.py … Compiling app_packages/tests/widgets/test_label.py … Compiling app_packages/tests/widgets/test_splitcontainer.py … Compiling app_packages/tests/sources/test_list_source.py … Compiling app_packages/tests/sources/init.py … Compiling app_packages/tests/sources/test_tree_source.py … Compiling app_packages/tests/sources/test_source.py … Compiling app_packages/tests/sources/test_value_source.py … Compiling app_packages/tests/sources/test_accessors.py … Compiling app_packages/tests/style/init.py … Compiling app_packages/tests/style/test_pack.py … Compiling app_packages/travertino/node.py … Compiling app_packages/travertino/declaration.py … Compiling app_packages/travertino/size.py … Compiling app_packages/travertino/init.py … Compiling app_packages/travertino/layout.py … Compiling app_packages/travertino/fonts.py … Compiling app_packages/travertino/constants.py … Compiling app_packages/travertino/colors.py … Compiling app_packages/toga_android/init.py … Compiling app_packages/toga_android/layout.py … Compiling app_packages/toga_android/window.py … Compiling app_packages/toga_android/app.py … Compiling app_packages/toga_android/factory.py … Compiling app_packages/toga_android/dialogs.py … Compiling app_packages/toga_android/widgets/box.py … Compiling app_packages/toga_android/widgets/textinput.py … Compiling app_packages/toga_android/widgets/base.py … Compiling app_packages/toga_android/widgets/init.py … Compiling app_packages/toga_android/widgets/label.py … Compiling app_packages/toga_android/widgets/passwordinput.py … Compiling app_packages/toga_android/widgets/button.py … Compiling app_packages/toga/command.py … Compiling app_packages/toga/platform.py … Compiling app_packages/toga/init.py … Compiling app_packages/toga/font.py … Compiling app_packages/toga/window.py … Compiling app_packages/toga/app.py … Compiling app_packages/toga/handlers.py …

Problem occurred in toga/handlers.py Node: YieldFrom(value=Call(func=Attribute(value=Name(id=‘asyncio’, ctx=Load(), lineno=19, col_offset=23), attr=‘sleep’, ctx=Load(), lineno=19, col_offset=23), args=[ Name(id=‘delay’, ctx=Load(), lineno=19, col_offset=37), ], keywords=[], lineno=19, col_offset=23), lineno=19, col_offset=12) :buildPythonDebug FAILED

FAILURE: Build failed with an exception.

  • Where: Build file ‘/home/sjuk/src/bee/appname/android/build.gradle’ line: 15

  • What went wrong: Execution failed for task ‘:buildPythonDebug’.

Process ‘command ‘voc’’ finished with non-zero exit value 1

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 22.684 secs $ adb logcat Python:* *:E

App started.`

Steps to reproduce

See Tutorial 0 - Hello, world!

Your Environment

  • Python Version (list the specific version number) 3.5.2

  • Operating System and Version (select from the following and list the specific version number; if your OS is not listed, list that as well)

    • macOS - version:
    • Linux - distro: Ubuntu - version: 16.04
    • Windows - version:
    • Other - name: - version:
  • Toga Target (the type of app you are trying to generate)

    • android
    • cocoa
    • django
    • gtk
    • iOS
    • tvOS
    • watchOS
    • winforms
    • win32
    • Other (please specify)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
freakboy3742commented, May 1, 2018

Thanks for the report. This has come up a couple of times on the chat room; I thought there was an existing ticket, but apparently not.

The problem is that the 0.3.0 branch hasn’t been updated for Android; the particular problem is that VOC doesn’t currently have support for the “yield from” Python syntax, which wasn’t used in toga 0.2, but is being used in 0.3.

We have a Summer of Code student who will be looking at this, so hopefully we’ll have a fix soon.

In the meantime, you’ll need to use toga 0.2.15 for Android.

0reactions
freakboy3742commented, Apr 25, 2020

We have a contractor currently working on rebuilding our Android backend under a grant from the PSF. Once that work completes, Android support will be restored.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found