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

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

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

      <legend id='EApSE'><style id='EApSE'><dir id='EApSE'><q id='EApSE'></q></dir></style></legend><tfoot id='EApSE'></tfoot>

      • <bdo id='EApSE'></bdo><ul id='EApSE'></ul>

    1. Kivy 應(yīng)用程序無法在 Android 上運行

      Kivy application does not work on Android(Kivy 應(yīng)用程序無法在 Android 上運行)
    2. <tfoot id='2Jg2M'></tfoot>

        • <bdo id='2Jg2M'></bdo><ul id='2Jg2M'></ul>

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

                <small id='2Jg2M'></small><noframes id='2Jg2M'>

                  <tbody id='2Jg2M'></tbody>

                <legend id='2Jg2M'><style id='2Jg2M'><dir id='2Jg2M'><q id='2Jg2M'></q></dir></style></legend>
              • 本文介紹了Kivy 應(yīng)用程序無法在 Android 上運行的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我想使用 kivy 在 Python 中為 Android 編寫簡單的應(yīng)用程序.可悲的是,當我開始示例代碼時,我只看到閃屏,幾秒鐘后應(yīng)用程序完成工作.調(diào)試存在很大問題,因為 Linux Mint 上的 adb 沒有檢測到我的設(shè)備.

                I want write simple application in Python for Android using kivy. Sadly when I start example code I see only splash screen and few second later application finish work. There is a huge problem with debugging because adb on Linux Mint does not detect my device.

                誰能看看我的代碼并告訴我為什么?要構(gòu)建應(yīng)用程序,我使用 buildozer.您還可以查看 create_env 腳本來檢查所有依賴項.

                Can someone look at my code and tell my why? To build application I use buildozer. You can also see create_env script to check all dependencies are there.

                最好的問候.德拉昆

                我開始調(diào)試我的應(yīng)用程序.結(jié)論:

                I started debugging my application. Conclusion:

                • buildozer + python3 + kivy 是個壞主意
                • 如果我在 text 屬性為 str 時使用 kivy.uix.button.Button 則出現(xiàn)異常AttributeError: 'str' object has no attribute 'decode'"
                • 如果我在 text 屬性為字節(jié)時使用 kivy.uix.button.Button,則會出現(xiàn)異常ValueError: Button.text accept only str"

                看起來像沒有解決方案的循環(huán).想知道我什么時候應(yīng)該報告?

                It looks like loop with no solution. Some idea when I should report it?

                異常位于 .buildozer/android/platform/build/build/python-installs/pad/android/init.py" 文件中,因此它看起來不像 kivy 和/或 buildozer 異常.

                Exception is in .buildozer/android/platform/build/build/python-installs/pad/android/init.py" file so it does not look like kivy and/or buildozer exception.

                推薦答案

                我用過python-for android工具,遇到了同樣的錯誤.但在我的情況下,應(yīng)用程序根本沒有運行 - 從啟動屏幕崩潰.最后,我找到了解決方案.你可以試試同樣的方法.

                I've used python-for android tool and faced with the same errors. But in my case, app didn't run at all - crashed from splash screen. Finally, I've found a solution. You can try the same way.

                所以我的管道是 python3 + python-for-android(p4a 工具,python-for-android,來自 master 分支)+ kivy (1.10.1)

                So my pipeline was python3 + python-for-android (p4a tool, python-for-android, from master branch) + kivy (1.10.1)

                有一個文件_android.pyx"用于 android 構(gòu)建配方(您可以通過命令 p4a recipes 查看可用的 p4a 配方的完整列表).該文件可能由 Buildozer 使用,并且在 APK 構(gòu)建過程中完全由 P4A 使用.你需要修復(fù)它.

                There is a file "_android.pyx" for android building recipe (full list of avaliable p4a recipes you can see by command p4a recipes). This file is, possibly, used by Buildozer, and exactly used by P4A during APK building procedure. You need to fix it.

                您可以通過以下方式在 Ubuntu 中找到它的位置(例如):

                You may find it's location in Ubuntu (for example) via:

                sudo updatedb
                locate _android.pyx
                

                它的路徑應(yīng)該是這樣的:

                It's path should be something like:

                ~/.local/lib/python3.6/site-packages/pythonforandroid/recipes/android/src/android/_android.pyx
                

                應(yīng)該有一個字符串:

                python_act = autoclass(JAVA_NAMESPACE.decode('utf-8') + u'.PythonActivity')
                

                所以你應(yīng)該改變它 - 像這樣:

                so you should change it - something like this:

                python_act = autoclass(str(JAVA_NAMESPACE) + u'.PythonActivity'),
                

                或者只是使用一些硬代碼:

                or just use some hardcode:

                python_act = autoclass("org/kivy/android/PythonActivity")
                

                或者來源中可能有其他 decode() 用法.

                Or there might be the other decode() usage in sources.

                原因:Python2 和 Python3 之間的差異 - decode() 方法可用于 Python 2 或 3 中的等效二進制數(shù)據(jù)類型,但它不能被 Python 2 和 3 之間的文本數(shù)據(jù)類型一致地使用因為 Python 3 中的 str 沒有方法 decode 函數(shù)在 Python3 中有不同的實現(xiàn).更多細節(jié)在這里:pyporting 功能問題p4a的github

                The reason: differences between Python2 and Python3 - the decode() method is usable on the equivalent binary data type in either Python 2 or 3, but it can’t be used by the textual data type consistently between Python 2 and 3 because str in Python 3 doesn’t have the method decode function has different realisation in Python3. More details are here: pyporting features issues p4a's github

                希望對你有所幫助.

                這篇關(guān)于Kivy 應(yīng)用程序無法在 Android 上運行的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                相關(guān)文檔推薦

                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 或網(wǎng)絡(luò)提供商)
                Get current location during app launch(在應(yīng)用啟動期間獲取當前位置)
                locationManager.getLastKnownLocation() return null(locationManager.getLastKnownLocation() 返回 null)

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

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

                    • <bdo id='p7DWh'></bdo><ul id='p7DWh'></ul>
                      <tfoot id='p7DWh'></tfoot>
                        <tbody id='p7DWh'></tbody>

                          <legend id='p7DWh'><style id='p7DWh'><dir id='p7DWh'><q id='p7DWh'></q></dir></style></legend>
                          主站蜘蛛池模板: 男人的天堂亚洲 | 欧美一卡二卡在线观看 | 欧美日韩高清 | 久在线| 国产精品久久久久久吹潮日韩动画 | 日本成人久久 | 99福利| 在线播放国产一区二区三区 | 国产精品一区二区在线播放 | 久久大陆 | 综合国产 | 国产精品一区在线观看 | 亚洲一区二区高清 | 日韩精品区 | 久久久久国产精品午夜一区 | 久久久久91 | 国产精品国产成人国产三级 | 日本成人中文字幕 | 91av视频 | 欧美视频一区二区三区 | 嫩草最新网址 | 一区二区三区网站 | a级片在线观看 | 国产在线视频在线观看 | 国产激情一区二区三区 | 国产精品亚洲一区二区三区在线观看 | 香蕉视频一区二区 | 欧美精品一区二区三区在线 | 中文字幕一区二区三区精彩视频 | 日韩精品久久久久久 | www四虎影视 | 久草热视频 | 一区视频在线播放 | 亚洲精品一 | 国产精品成人一区二区三区 | 日韩中出| 久久一区二区免费视频 | 日韩精品一区二区三区视频播放 | 中文字幕在线一区 | 999免费视频 | 操皮视频 |