首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >VOC错误,使用python构建android应用

VOC错误,使用python构建android应用
EN

Stack Overflow用户
提问于 2019-06-27 19:21:36
回答 1查看 291关注 0票数 0

我正在尝试使用gradle和beeware从Python构建一个android应用程序。

编辑:我正在遵循公文包教程中的教程0:https://briefcase.readthedocs.io/en/latest/tutorial/tutorial-0.html

我已经尝试了切换toga版本和切换VOC版本。这两种方法都不起作用。

这就是它说的错误所在:

代码语言:javascript
复制
        commandLine "voc -v -p app -o build/intermediates/classes/debug app".split()
    }
    exec {
        commandLine "voc -v -p app_packages -o build/intermediates/classes/debug app_packages".split()
    }
}

它应该构建应用程序并将其发送到我的手机,该手机通过og线连接到我的电脑,并打开USB调试。这是我得到的错误:

代码语言:javascript
复制
> Task :buildPythonDebug FAILED
Traceback (most recent call last):
  File "C:\Users\bart\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\bart\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\bart\AppData\Local\Programs\Python\Python37-32\Scripts\voc.exe\__main__.py", line 2, in <module>
  File "C:\Users\bart\AppData\Local\Programs\Python\Python36\lib\re.py", line 123, in <module>
    import sre_compile
  File "C:\Users\bart\AppData\Local\Programs\Python\Python36\lib\sre_compile.py", line 17, in <module>
    assert _sre.MAGIC == MAGIC, "SRE module mismatch"
AssertionError: SRE module mismatch

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\bart\PycharmProjects\untitled1\helloworld\android\build.gradle' line: 13

* 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. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.7/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 2s
16 actionable tasks: 1 executed, 15 up-to-date
    $ adb logcat Python:* *:E

App started.

https://github.com/Tiebe/dedruppel

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-06-27 20:39:36

您正在运行Python3.7 (Programs\Python\Python37-32\Scripts\voc.exe)中的voc,但是您的解释器使用的是Python3.6 (Python\Python36\lib\re.py)中的库。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56789942

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档