{"id":17364,"date":"2023-12-18T11:16:35","date_gmt":"2023-12-18T03:16:35","guid":{"rendered":"https:\/\/www.zhidianwl.com\/zhidian\/?p=17364"},"modified":"2023-12-18T11:16:35","modified_gmt":"2023-12-18T03:16:35","slug":"python%e5%bc%80%e5%8f%91%e5%ae%89%e5%8d%93app%e5%8f%af%e8%a1%8c%e5%90%97%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.zhidianwl.com\/zhidian\/2023\/17364\/","title":{"rendered":"python\u5f00\u53d1\u5b89\u5353app\u53ef\u884c\u5417\uff1f"},"content":{"rendered":"

Python\u5f00\u53d1\u5b89\u5353App\u662f\u53ef\u884c\u7684\u3002\u5c3d\u7ba1Java\u548cKotlin\u662f\u5f00\u53d1\u539f\u751fAndroid\u5e94\u7528\u7a0b\u5e8f\u7684\u4e3b\u6d41\u8bed\u8a00\uff0c\u4f46Python\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5e93\u548c\u6846\u67b6\u7528\u4e8e\u5f00\u53d1Android\u5e94\u7528\u7a0b\u5e8f\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u4f7f\u7528Python\u5f00\u53d1\u5b89\u5353App\u7684\u539f\u7406\u548c\u6d41\u7a0b\u3002<\/p>\n

1. \u7b80\u4ecb<\/p>\n

Python\u7684\u8de8\u5e73\u53f0\u7279\u6027\u4f7f\u5176\u6210\u4e3aAndroid\u5e94\u7528\u7a0b\u5e8f\u7684\u4e00\u4e2a\u6d41\u884c\u9009\u62e9\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e9b\u7279\u5b9a\u5e93\u548c\u6846\u67b6\uff0c\u5982Kivy\u3001BeeWare\u548cPyqtdeploy\u7b49\uff0c\u5c06Pytho\u5b89\u5353app\u5236\u4f5c<\/a>n\u4ee3\u7801\u8f6c\u6362\u4e3aAndroid\u5e94\u7528\u3002<\/p>\n

2. \u6846\u67b6\u548c\u5e93<\/p>\n

\u4ee5\u4e0b\u662f\u51e0\u4e2a\u4f7f\u7528Python\u5f00\u53d1Android\u5e94\u7528\u7a0b\u5e8f\u7684\u6d41\u884c\u5e93\u548c\u6846\u67b6\uff1a<\/p>\n

a. Kivy<\/p>\n

Kivy\u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u8de8\u5e73\u53f0Python\u5e93\uff0c\u53ef\u4ee5\u7528\u4e8e\u5feb\u901f\u521b\u5efa\u591a\u5e73\u53f0\u5e94\u7528\u7a0b\u5e8f\u3002\u5b83\u662f\u4e13\u4e3a\u89e6\u6478\u8bbe\u5907\u8bbe\u8ba1\u7684GUI\u5de5\u5177\u5305\uff0c\u5177\u6709\u4e30\u5bcc\u7684\u63a7\u4ef6\u3001\u5b89\u5353app<\/a>\u7a97\u53e3\u7cfb\u7edf\u548c\u591a\u70b9\u8f93\u5165\u652f\u6301\u3002\u5b83\u5177\u6709\u5185\u7f6e\u7684\u652f\u6301\u7528\u4e8e\u5982OpenGL\u7684\u56fe\u5f62\u5e93\uff0c\u5e76\u4f7f\u7528\u5e95\u5c42\u7684NDK\u548cAndroid API\u8fdb\u884c\u7f16\u8bd1\u3002<\/p>\n

b. BeeWare<\/p>\n

BeeWare\u662f\u4e00\u4e2a\u5f00\u6e90\u8de8\u5e73\u53f0\u5e94\u7528\u5f00\u53d1\u6846\u67b6\uff0c\u5141\u8bb8\u4f60\u4f7f\u7528Python\u7f16\u5199\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\u5e76\u5728\u5404\u79cd\u5e73\u53f0\u4e0a\u8fd0\u884c\uff0c\u5305\u62ecAndroid\u3002\u5b83\u81ea\u5e26\u4e00\u4e2a\u539f\u751f\u7684Python API\uff0c\u4f7f\u4f60\u80fd\u591f\u521b\u5efa\u539f\u751f\u7684Python\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n

c. Pyqtdeploy<\/p>\n

Pyqtdeploy\u662f\u4e00\u4e2a\u90e8\u7f72\u5de5\u5177\uff0c\u53ef\u4ee5\u4f7f\u7528Python\u548cQt\u5e93\u4e3a\u5404\u79cd\u5e73\u53f0\uff08\u5305\u62ecAndroid\uff09\u521b\u5efa\u72ec\u7acb\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002\u5b83\u5141\u8bb8\u5c06Python\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u6210\u4e00\u4e2a\u72ec\u7acb\u7684APK\u6587\u4ef6\uff0c\u4ee5\u4fbf\u5728Android\u8bbe\u5907\u4e0a\u8fd0\u884c\u3002<\/p>\n

3. \u5f00\u53d1\u6d41\u7a0b<\/p>\n

\u4e0b\u9762\u662f\u4f7f\u7528Python\u7f16\u5199Android\u5e94\u7528\u7a0b\u5e8f\u7684\u4e00\u822c\u8fc7\u7a0b\uff1a<\/p>\n

1. \u9009\u62e9\u4e00\u4e2a\u5e93\u6216\u6846\u67b6\uff08\u5982Kivy\u3001BeeWare\u7b49\uff09\u3002<\/p>\n

2. \u5b89\u88c5\u548c\u914d\u7f6e\u5f00\u53d1\u73af\u5883\uff08\u5982Python\uff0cKivy\uff0cAndroid SDK\u548cNDK\u7b49\uff09\u3002<\/p>\n

3. \u4f7f\u7528Python\u7f16\u5199\u5e94\u7528\u7a0b\u5e8f\u4ee3\u7801\u548c\u754c\u9762\u8bbe\u8ba1\u3002<\/p>\n

4. \u4f7f\u7528\u6240\u9009\u6846\u67b6\u548c\u5e93\u5c06\u4ee3\u7801\u548c\u8d44\u6e90\u6253\u5305\u6210APK\u6587\u4ef6\u3002<\/p>\n

5. \u5728Android\u6a21\u62df\u5668\u6216\u5b9e\u4f53\u8bbe\u5907\u4e0a\u6d4b\u8bd5\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n

6. \u4fee\u590d\u4efb\u4f55\u53ef\u80fd\u7684\u9519\u8bef\u548c\u95ee\u9898\u3002<\/p>\n

7. \u53d1\u5e03\u5e94\u7528\u7a0b\u5e8f\u5230Google Play\u5546\u5e97\u3002<\/p>\n

4. \u4f18\u70b9\u4e0e\u5c40\u9650\u6027<\/p>\n

\u4f7f\u7528Python\u8fdb\u884cAndroid\u5e94\u7528\u5f00\u53d1\u5177\u6709\u4e00\u5b9a\u7684\u4f18\u52bf\uff0c\u5305\u62ec\u8f83\u5feb\u7684\u5f00\u53d1\u8fc7\u7a0b\u3001\u8de8\u5e73\u53f0\u7279\u6027\u548c\u8f83\u6613\u4e8e\u5b66\u4e60\u3002\u4f46\u5b83\u4e5f\u5b58\u5728\u4e00\u4e9b\u5c40\u9650\u6027\uff0c\u5982\u6027\u80fd\u53ef\u80fd\u4e0d\u5982\u4f7f\u7528Java\u6216Kotlin\u7f16\u5199\u7684\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\uff0c\u67d0\u4e9b\u539f\u751fAPI\u7684\u652f\u6301\u53ef\u80fd\u4e0d\u5b8c\u5584\u3002<\/p>\n

\u603b\u4e4b\uff0c\u4f7f\u7528Python\u5f00\u53d1Android\u5e94\u7528\u7a0b\u5e8f\u662f\u53ef\u884c\u7684\u3002\u901a\u8fc7\u4f7f\u7528Kivy\u3001BeeWare\u7b49\u5e93\u548c\u6846\u67b6\uff0c\u53ef\u4ee5\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3aAndroid\u5e94\u7528\u7a0b\u5e8f\u3002\u867d\u7136\u53ef\u80fd\u5b58\u5728\u4e00<\/p>\n

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

\u4e9b\u6027\u80fd\u548cAPI\u652f\u6301\u65b9\u9762\u7684\u5c40\u9650\u6027\uff0c\u4f46Python\u5728\u5f00\u53d1\u901f\u5ea6\u3001\u8de8\u5e73\u53f0\u9b45\u529b\u548c\u6613\u4e8e\u5b66\u4e60\u65b9\u9762\u5177\u6709\u660e\u663e\u4f18\u52bf\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

Python\u5f00\u53d1\u5b89\u5353App\u662f\u53ef\u884c\u7684\u3002\u5c3d\u7ba1Java\u548cKotlin\u662f\u5f00\u53d1\u539f\u751fAndroid\u5e94\u7528\u7a0b\u5e8f\u7684\u4e3b\u6d41\u8bed\u8a00\uff0c\u4f46Python\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5e93\u548c\u6846\u67b6\u7528\u4e8e\u5f00\u53d1Android\u5e94\u7528\u7a0b\u5e8f\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u4f7f\u7528Python\u5f00<\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[23619,14,72,74,23618],"class_list":["post-17364","post","type-post","status-publish","format-standard","hentry","category-zuoapp","tag-app","tag-14","tag-72","tag-74"],"_links":{"self":[{"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/posts\/17364","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\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/comments?post=17364"}],"version-history":[{"count":1,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/posts\/17364\/revisions"}],"predecessor-version":[{"id":17390,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/posts\/17364\/revisions\/17390"}],"wp:attachment":[{"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/media?parent=17364"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/categories?post=17364"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/tags?post=17364"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}