久久久久久久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 上崩潰的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我能夠構建一個 .apk,但是在我將它安裝到我的 android 手機上之后,它只是在啟動時崩潰了.我失敗的想法是我正在使用 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).

                這就是我的導入在 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 文件有關嗎?我嘗試將 BeautifulSoup 添加到應用需求中,但這并沒有改變任何事情.

                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.

                任何幫助將不勝感激.

                推薦答案

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

                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.

                是的,您確實需要在規范中將 beautifulsoup4 列為一項要求.從查看 bs4 的代碼來看,bs4 似乎愿意使用幾個構建器"中的任何一個.它支持 HTMLParser、html5lib 或 lxml.我不知道為什么我們不能加載 HTMLParser,但它實際上是三個庫中 最不喜歡的 庫,如果不是因為導入周圍沒有 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).

                考慮到這一點,我包含了其他庫之一,并決定破解導入過程,以便 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 :)

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

                最終的結果是這樣的:

                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.

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

                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.

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

                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!

                這篇關于Buildozer 編譯 apk,但它在 android 上崩潰的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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)
              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>
                          主站蜘蛛池模板: 亚洲精品电影在线 | 夜夜骑综合 | 久久精彩| 日本激情视频中文字幕 | 国产高清久久 | 中文字幕动漫成人 | www四虎com| 亚洲女人天堂成人av在线 | 狠狠插狠狠操 | 欧美精品一区在线 | 欧美h视频 | 欧美久久精品一级c片 | 国产人免费人成免费视频 | 久久久免费电影 | 九九综合 | 久久久久综合 | 久久久999成人 | 91久久精品国产免费一区 | 国产黄色精品在线观看 | 999久久久| 免费人成激情视频在线观看冫 | av一区二区三区在线观看 | 精精国产xxxx视频在线播放 | av中文字幕网 | 日韩国产欧美视频 | 欧美日韩国产一区二区三区 | 99爱在线视频 | 欧美日韩国产综合在线 | 亚洲成人免费视频 | 精品久久香蕉国产线看观看亚洲 | 中国一级特黄真人毛片免费观看 | 国产精品久久性 | 国产99久久精品一区二区永久免费 | av激情影院 | 成人精品在线观看 | 日本久久一区二区三区 | 国产精品视频免费 | 亚洲激情在线观看 | 羞羞视频免费在线观看 | 日韩av在线免费 | 国产精品高潮呻吟久久av野狼 |