久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <i id='bsITz'><tr id='bsITz'><dt id='bsITz'><q id='bsITz'><span id='bsITz'><b id='bsITz'><form id='bsITz'><ins id='bsITz'></ins><ul id='bsITz'></ul><sub id='bsITz'></sub></form><legend id='bsITz'></legend><bdo id='bsITz'><pre id='bsITz'><center id='bsITz'></center></pre></bdo></b><th id='bsITz'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='bsITz'><tfoot id='bsITz'></tfoot><dl id='bsITz'><fieldset id='bsITz'></fieldset></dl></div>
      <bdo id='bsITz'></bdo><ul id='bsITz'></ul>
      1. <legend id='bsITz'><style id='bsITz'><dir id='bsITz'><q id='bsITz'></q></dir></style></legend>

      2. <tfoot id='bsITz'></tfoot>

      3. <small id='bsITz'></small><noframes id='bsITz'>

      4. 在帶有 buildozer 的 android 上使用 python3

        Using python3 on android with buildozer(在帶有 buildozer 的 android 上使用 python3)
          <tbody id='Is5jp'></tbody>

            <bdo id='Is5jp'></bdo><ul id='Is5jp'></ul>

              <small id='Is5jp'></small><noframes id='Is5jp'>

            • <tfoot id='Is5jp'></tfoot>

              1. <legend id='Is5jp'><style id='Is5jp'><dir id='Is5jp'><q id='Is5jp'></q></dir></style></legend>

                  <i id='Is5jp'><tr id='Is5jp'><dt id='Is5jp'><q id='Is5jp'><span id='Is5jp'><b id='Is5jp'><form id='Is5jp'><ins id='Is5jp'></ins><ul id='Is5jp'></ul><sub id='Is5jp'></sub></form><legend id='Is5jp'></legend><bdo id='Is5jp'><pre id='Is5jp'><center id='Is5jp'></center></pre></bdo></b><th id='Is5jp'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Is5jp'><tfoot id='Is5jp'></tfoot><dl id='Is5jp'><fieldset id='Is5jp'></fieldset></dl></div>
                  本文介紹了在帶有 buildozer 的 android 上使用 python3的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我用 python 3 和 kivy 編寫了一個小程序.現在我想使用 buildozer 構建一個 .apk 并在我的 android 手機上測試該應用程序.一切正常,我能夠在手機上安裝應用程序,但應用程序在啟動時崩潰了.

                  I have written a little program in python 3 and kivy. Now I want to build an .apk using buildozer and test the app on my android phone. Everything worked and I was able to install the app on the phone but the app crashed on startup.

                  錯誤日志顯示,apk 的 python 環境是 python 2.7 而不是 3.因此,我的問題是:是否可以在 android 上使用 python 3 環境構建帶有 buildozer 的 apk?還是我必須在 python2 中重寫應用程序?是否有可能強制 buildozer 使用 python3 的黑客攻擊?

                  The error log revealed, that the python enviroment of the apk was python 2.7 instead of 3. My question is therefore: Is it possible to build an apk with buildozer using a python 3 enviroment on android? Or do I have to rewrite the app in python2? Is there perhaps a possible hack to force buildozer to use python3?

                  我按照 inclement 建議的步驟操作,得到以下錯誤:

                  I followed the steps suggested by inclement and got the following error:

                   Traceback (most recent call last):
                  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
                    "__main__", fname, loader, pkg_name)
                  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
                    exec code in run_globals
                  File "/home/micha/python/ZugGit/ZugAppFahrt/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 747, in <module>
                    main()
                  File "/home/micha/python/ZugGit/ZugAppFahrt/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 744, in main
                    ToolchainCL()
                  File "/home/micha/python/ZugGit/ZugAppFahrt/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 323, in __init__
                    getattr(self, args.command)(unknown)
                  File "/home/micha/python/ZugGit/ZugAppFahrt/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 105, in wrapper_func
                    build_dist_from_args(ctx, dist, dist_args)
                  File "/home/micha/python/ZugGit/ZugAppFahrt/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 142, in build_dist_from_args
                    build_recipes(build_order, python_modules, ctx)
                  File "pythonforandroid/build.py", line 560, in build_recipes
                    recipe.build_arch(arch)
                  File "pythonforandroid/recipe.py", line 910, in build_arch
                    self.build_cython_components(arch)
                  File "pythonforandroid/recipe.py", line 919, in build_cython_components
                    command = sh.Command('python{}'.format(self.ctx.python_recipe.version))
                  File "/usr/lib/python2.7/site-packages/sh.py", line 788, in __init__
                    raise CommandNotFound(path)
                  sh.CommandNotFound: python3.5
                  # Command failed: python -m pythonforandroid.toolchain create --dist_name=zugFart --bootstrap=sdl2 --requirements=kivy==1.9.1,python3crystax --arch armeabi-v7a --copy-libs
                  

                  編輯 2: 這似乎是一個永無止境的故事.安裝了 python3.5 后,我遇到了這個錯誤:

                  Edit 2: This seems to be a never ending story. With python3.5 installed I ran into this error:

                  collect2: error: ld returned 1 exit status
                  error: command 'arm-linux-androideabi-gcc' failed with exit status 1
                  

                  隨著我過去從錯誤到錯誤的進展,將代碼簡單地更改為 python2.7 會更聰明,但現在我已經投入了這么多時間,我只想最終成功.:-)

                  With the time I used to advance from error to error it would be much smarter to simply change the code to python2.7 but now that I have so much time invested I just want to finally make it. :-)

                  那么有人知道如何解決這個問題嗎?

                  So does somebody have an idea how to solve this issue?

                  最后我終于投降并更改了我的代碼以使用 python 2.7.我在此過程中看到的一個好建議:如果您使用 futures,則必須將其添加到 buildozer 文件的要求中.否則,應用程序在啟動時會崩潰并顯示空模塊"錯誤消息.

                  Last I finally surrendered and changed my code to work with python 2.7. A good advice I have overseen during this process: If you using futures it is mandatory to add it to the requirements of the buildozer file. Otherwise the app crash on start with the "empty module" error message.

                  現在我的應用程序可以在手機上運行,??我終于高興了 :-) 感謝我試圖幫助我解決問題.

                  Now that my app works on the phone I'm finally happy :-) Thanks to inclement trying to help me with my problem.

                  推薦答案

                  我不確定 buildozer 是否有 python3 的構建選項,但 python-for-android 實驗性地支持它.您可以通過從其主分支安裝 buildozer 并使用 android_new 目標 (buildozer android_new debug) 來使用新版本的 python-for-android.如果 buildozer 可以使用它的 python3 選項,您需要在要求中添加 python3crystax(如果有,請替換 python2),手動下載 CrystaX NDK,并將 buildozer 的 NDK 路徑選項設置為指向它.可能還需要在需求中編寫 kivy==1.9.1 而不僅僅是 kivy.

                  I'm not sure if buildozer has a build option for python3 yet, but python-for-android supports it experimentally. You can use the new version of python-for-android by installing buildozer from its master branch and using the android_new target (buildozer android_new debug). If buildozer will work with its python3 option, you'd need to add python3crystax in the requirements (replace python2 if it's there), download the CrystaX NDK manually, and set buildozer's NDK path option to point to it. It might also be necessary to write kivy==1.9.1 in the requirements rather than just kivy.

                  Python3 構建仍在開發中,以具有 Python2 的所有功能,并且需要進行一些清理,包括修剪包含的文件和壓縮更多內容.一些菜譜也不適用于 python3,但大多數都可以.

                  Python3 builds are still in development to have all the features of the python2 ones, and need some clearing up including trimming the included files and compressing more. Some recipes also will no yet work with python3, though most do.

                  除非您的腳本很復雜并且大量使用 py2/py3 的主要差異(例如 unicode 處理),否則使用 python2 代替可能并不難.由于它們幾乎是同一種語言,因此您可能不需要重寫",只需進行一些小改動即可.

                  Unless your script is complicated and makes significant use of the major py2/py3 differences such as unicode handling, it probably wouldn't be difficult to use python2 instead. Since they're almost the same language, you probably don't need a 'rewrite', just a few small changes.

                  這篇關于在帶有 buildozer 的 android 上使用 python3的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Get user#39;s current location using GPS(使用 GPS 獲取用戶的當前位置)
                  IllegalArgumentException thrown by requestLocationUpdate()(requestLocationUpdate() 拋出的 IllegalArgumentException)
                  How reliable is LocationManager#39;s getLastKnownLocation and how often is it updated?(LocationManager 的 getLastKnownLocation 有多可靠,多久更新一次?)
                  How to detect Location Provider ? GPS or Network Provider(如何檢測位置提供者?GPS 或網絡提供商)
                  Get current location during app launch(在應用啟動期間獲取當前位置)
                  locationManager.getLastKnownLocation() return null(locationManager.getLastKnownLocation() 返回 null)

                  1. <i id='RO5wC'><tr id='RO5wC'><dt id='RO5wC'><q id='RO5wC'><span id='RO5wC'><b id='RO5wC'><form id='RO5wC'><ins id='RO5wC'></ins><ul id='RO5wC'></ul><sub id='RO5wC'></sub></form><legend id='RO5wC'></legend><bdo id='RO5wC'><pre id='RO5wC'><center id='RO5wC'></center></pre></bdo></b><th id='RO5wC'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='RO5wC'><tfoot id='RO5wC'></tfoot><dl id='RO5wC'><fieldset id='RO5wC'></fieldset></dl></div>

                      <small id='RO5wC'></small><noframes id='RO5wC'>

                      <tfoot id='RO5wC'></tfoot>
                          <bdo id='RO5wC'></bdo><ul id='RO5wC'></ul>

                            <tbody id='RO5wC'></tbody>
                            <legend id='RO5wC'><style id='RO5wC'><dir id='RO5wC'><q id='RO5wC'></q></dir></style></legend>
                            主站蜘蛛池模板: 亚洲欧美一区二区三区情侣bbw | 99久久99| 久久久av | www.99re| www.中文字幕av | 国产激情一区二区三区 | 亚洲在线一区 | 美女毛片 | 91精品久久久久久久久 | 久久一区二区视频 | 国产精品99久久久久久动医院 | 欧美日韩在线一区二区三区 | 国产精品自拍一区 | 综合久久综合久久 | 少妇诱惑av | 一级a性色生活片久久毛片 一级特黄a大片 | 波多野结衣一区二区三区在线观看 | 国产一区二区三区色淫影院 | 日韩高清黄色 | 在线观看亚洲一区二区 | 91成人在线视频 | 国产欧美精品一区二区三区 | 日韩网站免费观看 | 国产视频日韩 | 久久国产精品视频 | 久久久久久国产精品免费免费狐狸 | 国产黄色大片 | 日本一区视频在线观看 | 一区二区三区四区在线免费观看 | 亚洲福利视频网 | 欧产日产国产精品国产 | 伊人免费视频二 | 国产情侣在线看 | 国产日韩久久 | 免费一级欧美在线观看视频 | 欧美不卡一区二区三区 | 九九热热九九 | 日韩精品在线一区二区 | 久久精品美女 | 91亚洲一区 | 免费一级黄色录像 |