B
B
BnSmbr2021-01-18 11:56:55
Python
BnSmbr, 2021-01-18 11:56:55

Python, Kiwi, Bulldozer - how to give access to the Internet or see the error log?

I am writing the first (generally the first) application for android. I write in python using kivy. Compiling with a bulldozer. If the application is used only pure kiwi - everything works fine, but when you try to connect other modules (for example, requests) - everything is compiled, installed, but the application crashes on loading.

I am attaching the code:

from kivy.app import App
from kivy.uix.button import Button
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.gridlayout import GridLayout

import requests

class ChooseFirstly(BoxLayout):
def testing(self):
response = requests .get(' https://api.github.com ')
self.lbl.text = str(response)
class MyApp(App):
def build(self):
return ChooseFirstly()

if __name__ =='__main__':
MyApp().run()

-----------------------
KV file:

:
rows: 3
orientation :'vertical'

lbl: label
btn: buttn
Label:
id: label
text: "Does the Internet work?"
font_size: 14

Button:
id: buttn
size_hint: 0.6, 0.7
text: "TEST BUTTON"
font_size: 40
on_release:
root.testing()

--------------------- -----------------
In buildozer.spec settings - removed # from android.permissions = INTERNET and also added requests to required modules
As a result, the application crashes. If you remove only the lines related to requests and add the value of the printed variable, then everything works.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question