Kivy启动器不包括请求。使用buildozer/python for android构建您自己的apk。
我已经在buildozer.spec需求列表中添加了请求,但它无法在Kivy Launcher导入ı在终端中没有任何问题ıam在linux 上使用python 3.7.2
from kivy.app import App
from kivy.uix.label import Label
import os
import sys
import requests
class FirstKivy(App):
def build(self):
return Label(text="hello")
FirstKivy().run()
my logs:
[INFO ] Logger: Record log in/storage/emulated/0/kivy/Project/.kivy/logs/kivy_20-04-28_21.txt
[WARNING ] [Config ] Upgrading configuration in progress.
[WARNING ] [Config ] Older configuration version detected (21 instead of 14)
[INFO ] Kivy: v1.9.1
[INFO ] Python: v2.7.2 (default, Mar 20 2016, 23:30:13)
[GCC 4.8]
[INFO ] Factory: 179 symbols loaded
[WARNING ] stderr: /data/user/0/org.kivy.pygame/files/lib/python2.7/site-packages/kivy/core/image/img_pygame.py:13: RuntimeWarning: import cdrom: No module named cdrom
[WARNING ] stderr: (ImportError: No module named cdrom)
[INFO ] Image: Providers: img_tex, img_dds, img_gif, img_pygame, img_pil (img_ffpyplayer ignored)
[INFO ] Text: Provider: pygame
[WARNING ] stderr: Traceback (most recent call last):
[WARNING ] stderr: File "main.py", line 8, in <module>
[WARNING ] stderr: import requests
[WARNING ] stderr: ImportError: No module named requests