{"id":17085,"date":"2023-12-15T11:06:38","date_gmt":"2023-12-15T03:06:38","guid":{"rendered":"https:\/\/www.zhidianwl.com\/zhidian\/?p=17085"},"modified":"2023-12-15T11:06:38","modified_gmt":"2023-12-15T03:06:38","slug":"python3%e5%bc%80%e5%8f%91%e5%ae%89%e5%8d%93app%e6%80%8e%e4%b9%88%e5%81%9a%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.zhidianwl.com\/zhidian\/2023\/17085\/","title":{"rendered":"python3\u5f00\u53d1\u5b89\u5353app\u600e\u4e48\u505a\uff1f"},"content":{"rendered":"

Python3\u5f00\u53d1Android\u5e94\u7528\u662f\u901a\u8fc7\u4f7f\u7528Kivy\u6846\u67b6\u5b9e\u73b0\u7684\u3002Kivy \u662f\u4e00\u4e2a\u7528 Python \u7f16\u5199\u7684\u8de8\u5e73\u53f0 GUI \u5e93\uff0c\u53ef\u4ee5\u8f7b\u677e\u521b\u5efa\u5e94\u7528\u7a0b\u5e8f\u548c\u7528\u6237\u754c\u9762\u3002Kivy \u4e0d\u4ec5\u53ef\u4ee5\u5f00\u53d1 Android \u5e94\u7528\u7a0b\u5e8f\uff0c\u8fd8\u652f\u6301 iOS\u3001Linux\u3001Windows \u548c MacOS \u7b49\u3002<\/p>\n

\u5b9e\u73b0 Python3 \u5728 Android \u5e73\u53f0\u5f00\u53d1\u5e94\u7528\u5206\u4e3a\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a<\/p>\n

1. \u5b89\u88c5 And<\/p>\n

<\/figure>\n<\/p>\n

roid SDK \u548c NDK<\/p>\n

\u4f60\u9700\u8981\u4e0b\u8f7d\u5b89\u88c5 Android SDK \u548c NDK\u4ee5\u7acb\u8db3Android\u4e0a\u7684\u57fa\u7840\u5f00\u53d1\u73af\u5883\u3002\u53ef\u4ee5\u4ece\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\uff1ahttps:\/\/developer.android.com\/studio\/index.html\u3002<\/p>\n

2. \u5b89\u88c5 Python-for-android \u5de5\u5177<\/p>\n

Python-for-android \u662f\u4e00\u4e2a Pyt\u5b89\u5353app\u5236\u4f5c<\/a>hon \u5de5\u5177\u96c6\uff0c\u5b83\u53ef\u4ee5\u4f7fPython\u7a0b\u5e8f\u5728 Android \u5e73\u53f0\u4e0a\u8fd0\u884c\u3002\u4f7f\u7528Python-for-android \u5de5\u5177\u53ef\u4ee5\u901a\u8fc7 pip \u5b89\u88c5\uff1a`$ pip install python-for-android`\u3002<\/p>\n

3. \u521b\u5efa Python \u4ee3\u7801<\/p>\n

\u5728\u7f16\u5199\u4ee3\u7801\u4e4b\u524d\uff0c\u9700\u8981\u5148\u786e\u5b9a\u5e94\u7528\u7a0b\u5e8f\u754c\u9762\u8bbe\u8ba1\u548c\u529f\u80fd\u3002\u53ef\u4ee5\u4eceKivy\u7684\u4f8b\u5b50\u5f00\u59cb\u5b89\u5353app\u5f00\u53d1\u5de5\u5177<\/a>\uff0c\u8fd0\u884c\u5b9e\u4f8b\u5e76\u5b66\u4e60Kivy\u6846\u67b6\u7684\u7279\u6027\u3002<\/p>\n

4. \u6253\u5305\u7a0b\u5e8f\u81f3 Android \u8bbe\u5907<\/p>\n

\u4f7f\u7528 python-for-android \u6253\u5305\u6709\u4e24\u79cd\u65b9\u5f0f\uff1a\u4e00\u79cd\u662f\u76f4\u63a5\u5728 Android \u8bbe\u5907\u4e0a\u751f\u6210\u7a0b\u5e8f\u3002\uff08\u9700\u8981\u5728 Android \u8bbe\u5907\u4e2d\u5b89\u88c5 Termux\uff0c\u5b83\u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684 Linux \u7ec8\u7aef\u5de5\u5177\u96c6\uff09\u3002\u53e6\u4e00\u79cd\u65b9\u5f0f\u662f\u5728\u8ba1\u7b97\u673a\u4e0a\u8fdb\u884c\u6253\u5305\uff08Windows\u3001Linux \u6216 macOS\uff09\u518d\u4f20\u8f93\u5230Android \u8bbe\u5907\u4e0a\u8fdb\u884c\u6d4b\u8bd5\u3002<\/p>\n

\u4ee5\u4e0a\u4ecb\u7ecd\u7684\u662fPython3\u5728Android\u4e0a\u5f00\u53d1\u5e94\u7528\u7684\u57fa\u672c\u6b65\u9aa4\uff0c\u4f46\u662f\u5b9e\u9645\u5f00\u53d1\u4e2d\u8fd8\u9700\u8981\u66f4\u591a\u7684\u6280\u80fd\u3002\u5982\u4f55\u5904\u7406\u5e94\u7528\u7a0b\u5e8f\u4e2d\u7684\u6587\u4ef6\u52a0\u8f7d\u3001\u5185\u5b58\u4f7f\u7528\u3001\u5b89\u5168\u6027\u7b49\u95ee\u9898\uff0c\u90fd\u9700\u8981\u5177\u5907\u76f8\u5173\u7684\u77e5\u8bc6\u548c\u6280\u80fd\u624d\u80fd\u8bbe\u8ba1\u5b89\u5168\u3001\u7a33\u5b9a\u7684\u5e94\u7528\u7a0b\u5e8f\u3002\u9700\u8981\u610f\u8bc6\u5230\u5728Android\u4e0a\u7684\u5e94\u7528\u7a0b\u5e8f\u4e2d\u9700\u8981\u7279\u6b8a\u5904\u7406\u624d\u80fd\u8fbe\u5230\u8fd9\u4e9b\u76ee\u6807\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

Python3\u5f00\u53d1Android\u5e94\u7528\u662f\u901a\u8fc7\u4f7f\u7528Kivy\u6846\u67b6\u5b9e\u73b0\u7684\u3002Kivy \u662f\u4e00\u4e2a\u7528 Python \u7f16\u5199\u7684\u8de8\u5e73\u53f0 GUI \u5e93\uff0c\u53ef\u4ee5\u8f7b\u677e\u521b\u5efa\u5e94\u7528\u7a0b\u5e8f\u548c\u7528\u6237\u754c\u9762\u3002Kivy \u4e0d\u4ec5\u53ef\u4ee5\u5f00\u53d1 Android <\/p>\n","protected":false},"author":14,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[23479,23478,111,14,72],"class_list":{"0":"post-17085","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-zuoapp","7":"tag-app","9":"tag-111","10":"tag-14","11":"tag-72"},"_links":{"self":[{"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/posts\/17085","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/comments?post=17085"}],"version-history":[{"count":1,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/posts\/17085\/revisions"}],"predecessor-version":[{"id":17154,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/posts\/17085\/revisions\/17154"}],"wp:attachment":[{"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/media?parent=17085"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/categories?post=17085"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/tags?post=17085"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}