© dotmodus |
由於語法渲染問題而影響閱讀體驗, 請移步博客閱讀~
本文GitPage地址
You may see error code below when you try to import android
in your PC.
Traceback (most recent call last):
File "main.py", line 5, in <module>
from android.permissions import request_permissions, Permission
ModuleNotFoundError: No module named 'android'
For solving this, you can import platform
like below:
from kivy.utils import platform
if platform == "android":
from android.permissions import request_permissions, Permission
request_permissions([Permission.READ_EXTERNAL_STORAGE, Permission.WRITE_EXTERNAL_STORAGE])
Enjoy~
由於語法渲染問題而影響閱讀體驗, 請移步博客閱讀~
本文GitPage地址
GitHub: Karobben
Blog:Karobben
BiliBili:史上最不正經的生物狗