{"id":46274,"date":"2024-06-26T17:48:57","date_gmt":"2024-06-26T09:48:57","guid":{"rendered":"https:\/\/app.applebyme.cn\/cloud\/?p=46274"},"modified":"2024-06-26T17:48:57","modified_gmt":"2024-06-26T09:48:57","slug":"p4a%e6%89%93%e5%8c%85apk%e6%98%af%e6%80%8e%e4%b9%88%e5%ae%9e%e7%8e%b0%e7%9a%84%e5%91%a2","status":"publish","type":"post","link":"https:\/\/app.applebyme.cn\/cloud\/appkaifa\/46274.html","title":{"rendered":"p4a\u6253\u5305apk\u662f\u600e\u4e48\u5b9e\u73b0\u7684\u5462?"},"content":{"rendered":"<p>P4A\u662f\u4e00\u6b3e\u57fa\u4e8ePython\u7684\u5f00\u6e90\u5de5\u5177\uff0c\u53ef\u4ee5\u5c06Python\u4ee3\u7801\u6253\u5305\u6210Android\u5e94\u7528\u7a0b\u5e8f\u3002P4A\u7684\u5168\u79f0\u4e3aPython for Android\uff0c\u5b83\u4f7f\u7528\u4e86\u4e00\u4e9b\u5f00\u6e90\u7684\u5de5\u5177\u548c\u5e93\uff0c\u5982SDL\u3001Pygame\u7b49\uff0c\u6765\u63d0\u4f9b\u5bf9Android\u5e73\u53f0\u7684\u652f\u6301\u3002<\/p>\n<p>P4A\u7684\u6253\u5305\u8fc7\u7a0b\u4e3b\u8981\u5305\u62ec\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a<\/p>\n<p>1. \u5b89\u88c5\u4f9d\u8d56\u5e93<\/p>\n<p>\u5728\u4f7f\u7528P4A\u4e4b\u524d\uff0c\u9700\u8981\u5148\u5b89\u88c5\u4e00\u4e9b\u5fc5\u8981\u7684\u4f9d\u8d56\u5e93\uff0c\u5982Python\u3001JDK\u3001Android SDK\u7b49\u3002\u540c\u65f6\uff0c\u8fd8\u9700\u8981\u5b89\u88c5\u4e00\u4e9bP4A\u6240\u9700\u7684Python\u5e93\uff0c\u5982setuptools\u3001six\u7b49\u3002\u5b89\u88c5\u8fc7\u7a0b\u53ef\u4ee5\u53c2\u8003P4A\u7684\u5b98\u65b9\u6587\u6863\u3002<\/p>\n<p>2. \u521b\u5efa\u4e00\u4e2a\u9879\u76ee<\/p>\n<p>\u4f7f\u7528P4A\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u9879\u76ee\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u8981\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>p4a apk &#8211;name myapp &#8211;package com.example.myapp &#8211;ve<a href=\"https:\/\/appdabao.yimenapp.com\/jiage-505.html\">app\u5c01\u88c5\u5de5\u5177<\/a>rsion 1.0 &#8211;requirements kivy &#8211;private \/path\/to\/myapp &#8211;fullscreen<\/p>\n<p>&#8220;`<\/p>\n<p>\u5176\u4e2d\uff0c&#8211;name\u53c2\u6570\u6307\u5b9a\u5e94\u7528\u7a0b\u5e8f\u7684\u540d\u79f0\uff0c&#8211;package\u53c2\u6570\u6307\u5b9a\u5e94\u7528\u7a0b\u5e8f\u7684\u5305\u540d\uff0c&#8211;version\u53c2\u6570\u6307\u5b9a\u5e94\u7528\u7a0b\u5e8f\u7684\u7248\u672c\u53f7\uff0c&#8211;requirements\u53c2\u6570\u6307\u5b9a\u5e94\u7528\u7a0b\u5e8f\u6240\u4f9d\u8d56\u7684\u5e93\uff0c&#8211;private\u53c2\u6570\u6307\u5b9a\u5e94\u7528\u7a0b\u5e8f\u7684\u4ee3\u7801\u76ee\u5f55\uff0c&#8211;fullscreen\u53c2\u6570\u6307\u5b9a\u5e94\u7528\u7a0b\u5e8f\u662f\u5426\u5168\u5c4f\u663e\u793a\u3002<\/p>\n<p>3. \u914d\u7f6e\u73af<a href=\"https:\/\/appdabao.yimenapp.com\/jiage-558.html\">\u539f\u751f\u6253\u5305app<\/a>\u5883<\/p>\n<p>\u5728\u6253\u5305\u4e4b\u524d\uff0c\u8fd8\u9700\u8981\u914d\u7f6e\u4e00\u4e9b\u73af\u5883\u53d8\u91cf\uff0c\u5982ANDROIDSDK\u3001ANDROIDNDK\u3001ANDROIDAPI\u7b49\u3002\u8fd9\u4e9b\u73af\u5883\u53d8\u91cf\u53ef\u4ee5\u901a\u8fc7\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u914d\u7f6e\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>export ANDROIDSDK=\/path\/to\/android\/sdk<\/p>\n<p>export ANDROIDNDK=\/path\/to\/android\/ndk<\/p>\n<p>export ANDROIDAPI=28<\/p>\n<p>&#8220;`<\/p>\n<p>\u5176\u4e2d\uff0cANDROIDSDK\u548cANDROIDNDK\u5206\u522b\u6307\u5b9aAndroid SDK\u548cAndroid NDK\u7684\u8def\u5f84\uff0cANDROIDAPI\u6307\u5b9a\u4f7f\u7528\u7684Android API\u7248\u672c\u53f7\u3002<\/p>\n<p>4. \u6267\u884c\u6253\u5305\u547d\u4ee4<\/p>\n<p>\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u5373\u53ef\u5f00\u59cb\u6253\u5305\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>p4a apk &#8211;debug &#8211;verbose &#8211;sdk-dir \/path\/to\/android\/sdk &#8211;ndk-dir \/path\/to\/android\/ndk &#8211;private \/path\/to\/myapp &#8211;package com.example.myapp &#8211;name myapp &#8211;version 1.0 &#8211;requirements kivy &#8211;fullscreen<\/p>\n<p>&#8220;`<\/p>\n<p>\u5176\u4e2d\uff0c&#8211;debug\u53c2\u6570\u6307\u5b9a\u4f7f\u7528\u8c03\u8bd5\u6a21\u5f0f\uff0c&#8211;<\/p>\n<p><figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.yimenyun.net\/2023-03\/23\/12\/08384717327.jpg\" \/><\/figure>\n<\/p>\n<p>verbose\u53c2\u6570\u6307\u5b9a\u8f93\u51fa\u8be6\u7ec6\u4fe1\u606f\uff0c&#8211;sdk-dir\u53c2\u6570\u6307\u5b9aAndroid SDK\u7684\u8def\u5f84\uff0c&#8211;ndk-dir\u53c2\u6570\u6307\u5b9aAndroid NDK\u7684\u8def\u5f84\u3002<\/p>\n<p>\u7ecf\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0cP4A\u5c31\u4f1a\u81ea\u52a8\u6253\u5305\u751f\u6210\u4e00\u4e2aAPK\u6587\u4ef6\uff0c\u53ef\u4ee5\u901a\u8fc7Android\u6a21\u62df\u5668\u6216\u771f\u673a\u8fdb\u884c\u5b89\u88c5\u548c\u6d4b\u8bd5\u3002<\/p>\n<p>\u603b\u7684\u6765\u8bf4\uff0cP4A\u6253\u5305APK\u7684\u8fc7\u7a0b\u76f8\u5bf9\u6765\u8bf4\u6bd4\u8f83\u7b80\u5355\uff0c\u53ea\u9700\u8981\u6309\u7167\u4ee5\u4e0a\u6b65\u9aa4\u8fdb\u884c\u64cd\u4f5c\u5373\u53ef\u3002\u540c\u65f6\uff0cP4A\u8fd8\u63d0\u4f9b\u4e86\u4e00\u4e9b\u5176\u4ed6\u529f\u80fd\uff0c\u5982\u6253\u5305\u6210iOS\u5e94\u7528\u7a0b\u5e8f\u3001\u4f7f\u7528Cython\u52a0\u901f\u7b49\uff0c\u53ef\u4ee5\u6839\u636e\u9700\u6c42\u8fdb\u884c\u4f7f\u7528\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>P4A\u662f\u4e00\u6b3e\u57fa\u4e8ePython\u7684\u5f00\u6e90\u5de5\u5177\uff0c\u53ef\u4ee5\u5c06Python\u4ee3\u7801\u6253\u5305\u6210Android\u5e94\u7528\u7a0b\u5e8f\u3002P4A\u7684\u5168\u79f0\u4e3aPython for Android\uff0c\u5b83\u4f7f\u7528\u4e86\u4e00\u4e9b\u5f00\u6e90\u7684\u5de5\u5177\u548c\u5e93\uff0c\u5982SDL\u3001Pygame\u7b49\uff0c<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[39217,3755,1065,1775,39216],"class_list":["post-46274","post","type-post","status-publish","format-standard","hentry","category-appkaifa","tag-firebaseapk","tag-3755","tag-1065","tag-1775","tag-appstore"],"_links":{"self":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/46274","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/comments?post=46274"}],"version-history":[{"count":1,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/46274\/revisions"}],"predecessor-version":[{"id":46370,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/46274\/revisions\/46370"}],"wp:attachment":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/media?parent=46274"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/categories?post=46274"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/tags?post=46274"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}