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

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

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

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

    1. <tfoot id='KcZbD'></tfoot>
      <legend id='KcZbD'><style id='KcZbD'><dir id='KcZbD'><q id='KcZbD'></q></dir></style></legend>
    2. Buildozer 編譯 apk,但它在 android 上崩潰

      Buildozer compiles apk, but it crashes on android(Buildozer 編譯 apk,但它在 android 上崩潰)

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

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

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

            <legend id='EJ8en'><style id='EJ8en'><dir id='EJ8en'><q id='EJ8en'></q></dir></style></legend>

            <tfoot id='EJ8en'></tfoot>
                  <tbody id='EJ8en'></tbody>

              1. 本文介紹了Buildozer 編譯 apk,但它在 android 上崩潰的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                我能夠構(gòu)建一個(gè) .apk,但是在我將它安裝到我的 android 手機(jī)上之后,它只是在啟動時(shí)崩潰了.我失敗的想法是我正在使用 3rd 方庫,例如(beautifulsoup).

                I am able to build an .apk, but after I install it on my android phone it simply crashes at startup. My thoughts for failing is that I am using 3rd party libraries e.g(beautifulsoup).

                這就是我的導(dǎo)入在 main.py 中的樣子:

                This is how my imports look in main.py:

                from kivy.app import App
                from kivy.properties import ListProperty, StringProperty
                from kivy.uix.boxlayout import BoxLayout
                from kivy.uix.gridlayout import GridLayout
                from kivy.uix.button import Button
                from kivy.uix.label import Label
                from kivy.uix.scrollview import ScrollView
                from kivy.uix.screenmanager import ScreenManager, Screen, FadeTransition
                
                import time, os, random, urllib2, re, cookielib as cj
                
                from bs4 import BeautifulSoup as bs
                from functools import partial
                

                我在跑小牛10.9.3

                I'm running mavericks 10.9.3

                它與 buildozer.spec 文件有關(guān)嗎?我嘗試將 BeautifulSoup 添加到應(yīng)用需求中,但這并沒有改變?nèi)魏问虑?

                Does it have something to do with buildozer.spec file? I've tried adding BeautifulSoup to app requirements, but it doesn't change a thing.

                任何幫助將不勝感激.

                推薦答案

                我也遇到了這個(gè)問題,但我(顯然)能夠通過解決方法讓一切正常工作.由于看起來您發(fā)布的不是 logcat,因此我假設(shè)您遇到了與我相同的問題.

                I ran into this problem as well, but I was (apparently) able to get everything working fine with a workaround. Since it doesn't look like you posted a logcat, I'll assume you ran into the same issue I did.

                是的,您確實(shí)需要在規(guī)范中將 beautifulsoup4 列為一項(xiàng)要求.從查看 bs4 的代碼來看,bs4 似乎愿意使用幾個(gè)構(gòu)建器"中的任何一個(gè).它支持 HTMLParser、html5lib 或 lxml.我不知道為什么我們不能加載 HTMLParser,但它實(shí)際上是三個(gè)庫中 最不喜歡的 庫,如果不是因?yàn)閷?dǎo)入周圍沒有 try 塊,它似乎一切都會正常工作(只要其他解析庫之一可用).

                Yes, you do need to list beautifulsoup4 as a requirement in your spec. From looking into bs4's code, it looks like bs4 is willing to use any of several "builders." It supports HTMLParser, html5lib, or lxml. I have no idea why we can't load HTMLParser, but it's actually the least preferred library of the three, and if it weren't for the fact that there's no try block around the import, it seems that everything would work fine (as long as one of the other parsing libraries was available).

                考慮到這一點(diǎn),我包含了其他庫之一,并決定破解導(dǎo)入過程,以便 Python 假裝 _htmlparser 加載正常 :)

                With this in mind, I included one of the other libraries, and I decided to hack the import process so that Python would pretend _htmlparser loaded okay :)

                這篇文章很有啟發(fā)性:http://xion.org.pl/2012/05/06/hacking-python-imports/

                最終的結(jié)果是這樣的:

                import imp
                import sys
                
                class ImportBlocker(object):
                
                    def __init__(self, *args):
                        self.black_list = args
                
                    def find_module(self, name, path=None):
                        if name in self.black_list:
                            return self
                
                        return None
                
                    def load_module(self, name):
                        module = imp.new_module(name)
                        module.__all__ = [] # Necessary because of how bs4 inspects the module
                
                        return module
                
                sys.meta_path = [ImportBlocker('bs4.builder._htmlparser')]
                from bs4 import BeautifulSoup
                

                我還在 buildozer.spec 的要求中添加了 html5lib.

                I also added html5lib to the requirements in buildozer.spec.

                現(xiàn)在,這是解決問題的正確方法嗎?我不知道.最好的方法可能是要求作者修復(fù)它.可能就像將導(dǎo)入放在 try 塊中一樣簡單.盡管如此,這是我目前采用的方法,它至少是一個(gè)有趣的練習(xí),也是一種測試你的應(yīng)用直到出現(xiàn)更好的修復(fù)的方法.

                Now, is this the right way to solve the problem? I don't know. The best approach would probably be to request that the author fix it. It might be as simple as to put the import in a try block. Nevertheless, this is the approach I've gone with for the moment, and it is at least an interesting exercise, and a way to test your app until a better fix comes along.

                另外,我應(yīng)該警告您,我最近才這樣做,所以我不能 100% 保證它不會造成任何問題,但至少,它運(yùn)行良好,足以讓我的應(yīng)用程序運(yùn)行并抓取我感興趣的特定網(wǎng)站.祝你好運(yùn)!

                Additionally, I should warn you that I only did this recently, so I can't 100% guarantee that it won't cause any problems, but at a minimum, it's worked well enough to get my app running and scraping the particular website I was interested in. Good luck!

                這篇關(guān)于Buildozer 編譯 apk,但它在 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 獲取用戶的當(dāng)前位置)
                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)用啟動期間獲取當(dāng)前位置)
                locationManager.getLastKnownLocation() return null(locationManager.getLastKnownLocation() 返回 null)
              2. <tfoot id='xUOM1'></tfoot>

                1. <small id='xUOM1'></small><noframes id='xUOM1'>

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

                      <tbody id='xUOM1'></tbody>
                      1. <legend id='xUOM1'><style id='xUOM1'><dir id='xUOM1'><q id='xUOM1'></q></dir></style></legend>
                          <i id='xUOM1'><tr id='xUOM1'><dt id='xUOM1'><q id='xUOM1'><span id='xUOM1'><b id='xUOM1'><form id='xUOM1'><ins id='xUOM1'></ins><ul id='xUOM1'></ul><sub id='xUOM1'></sub></form><legend id='xUOM1'></legend><bdo id='xUOM1'><pre id='xUOM1'><center id='xUOM1'></center></pre></bdo></b><th id='xUOM1'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='xUOM1'><tfoot id='xUOM1'></tfoot><dl id='xUOM1'><fieldset id='xUOM1'></fieldset></dl></div>
                          主站蜘蛛池模板: 天天干天天玩天天操 | 人妖一区 | 成人免费xxxxx在线视频 | 国产美女精品 | 亚洲日韩中文字幕一区 | 中文字幕亚洲视频 | 欧美日韩在线精品 | 在线视频一区二区三区 | 日韩在线中文字幕 | 亚洲激情第一页 | 国产中文在线观看 | 欧美亚洲免费 | 久草在线在线精品观看 | 成年视频在线观看福利资源 | 国产精品欧美一区二区三区 | 在线亚洲欧美 | 91免费高清| 久久久99精品免费观看 | 国产三级 | 日韩一级免费电影 | 日韩精品中文字幕在线 | 国产一区免费视频 | 一级黄色片网址 | 国产精品高潮呻吟久久久久 | 国产精品呻吟久久av凹凸 | www.久久.com | 成人乱人乱一区二区三区软件 | 成人欧美一区二区三区在线播放 | 91精品国产一区二区三区香蕉 | 日韩精品视频在线 | 亚洲网站在线观看 | 91精品国产综合久久婷婷香蕉 | 亚洲福利在线观看 | 久久福利 | av日韩一区 | 天天爽夜夜操 | 亚洲一区二区中文字幕 | 成人精品国产 | 亚洲成人精品国产 | 在线观看毛片网站 | 欧美一级黄色免费看 |