android build failed with toga 0.3.0.dev8 and briefcase-template
See original GitHub issueExpected 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
- Writing application template… Template Python-Android-template succesfully updated. Project template: /home/sjuk/.cookiecutters/Python-Android-template
- All libs are already copied
- Determining best support package…
- Installing support package… Support package: https://pybee-briefcase-support.s3-us-west-2.amazonaws.com/Python-Android-support/3.5/Android/Python-3.5-Android-support.b5.tar.gz
- Installing requirements… No requirements.
- Installing platform requirements… Collecting toga-android==0.3.0.dev8 Using cached https://files.pythonhosted.org/packages/92/fe/348a39e2e0bbcac2d3ed511dd2b62943b488e7dcb8097c437416caf1c179/toga_android-0.3.0.dev8-py3-none-any.whl Collecting toga-core==0.3.0.dev8 (from toga-android==0.3.0.dev8) Using cached https://files.pythonhosted.org/packages/a4/2e/4757cadb2206e2f6bb6136fda395dbec2d84bda86b77b5713f435b0fdb60/toga_core-0.3.0.dev8-py3-none-any.whl Collecting travertino>=0.1.0 (from toga-core==0.3.0.dev8->toga-android==0.3.0.dev8) Using cached https://files.pythonhosted.org/packages/56/3f/f03efe63c2bdc72763ac39777c9ebbab98605ced5c74aefe48b4fa0abb4d/travertino-0.1.2-py3-none-any.whl Installing collected packages: travertino, toga-core, toga-android Successfully installed toga-android-0.3.0.dev8 toga-core-0.3.0.dev8 travertino-0.1.2
- Installing project code… Processing /home/sjuk/src/bee/appname Building wheels for collected packages: appname Running setup.py bdist_wheel for appname … done Stored in directory: /tmp/pip-ephem-wheel-cache-gyj59_ij/wheels/be/e1/5c/65fa694e9bc762953161ef0e2ab25e3695247c6ea9542e4e55 Successfully built appname Installing collected packages: appname Successfully installed appname-0.0.1
- No icons defined - using default…
- No splash screen defined…
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:
- Created 5 years ago
- Comments:8 (3 by maintainers)
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.
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.