{"id":3322,"date":"2022-01-12T16:55:25","date_gmt":"2022-01-12T08:55:25","guid":{"rendered":"https:\/\/learn-house.idv.tw\/?p=3322"},"modified":"2022-01-25T10:20:26","modified_gmt":"2022-01-25T02:20:26","slug":"androidplay-auto-installs-pai%ef%bc%8c%e7%b7%a8%e8%ad%af%e5%a4%b1%e6%95%97failed-ninja-unknown-target-modules-in-playautoinstallconfig","status":"publish","type":"post","link":"https:\/\/learn-house.idv.tw\/?p=3322","title":{"rendered":"[Android]Play Auto Installs (PAI)\uff0c\u7de8\u8b6f\u5931\u6557FAILED: ninja: unknown target &#8216;MODULES-IN-PlayAutoInstallConfig&#8217;"},"content":{"rendered":"<p>\u7531\u65bcGoogle\u6709\u660e\u78ba\u8aaa\u6b64\u6587\u4ef6\u70baConfidential material\uff0c\u4e5f\u56e0\u70ba\u5982\u6b64\uff0c\u7576\u4f7f\u7528\u76f8\u95dc\u6280\u8853\u7684\u958b\u767c\u6642\uff0c\u5e38\u5e38\u6703\u9762\u81e8\u5be6\u4f5c\u4e0d\u51fa\u4f86\u6216\u9047\u5230\u554f\u984c\uff0c\u4e0a\u7db2Google\u537b\u53c8\u627e\u4e0d\u5230\u76f8\u95dc\u8a0e\u8ad6\u6216\u89e3\u6c7a\u65b9\u6cd5\u3002<br \/>\n\u6709\u9451\u65bc\u6b64\uff0c\u5728\u9019\u8a18\u9304\u4e00\u4e0b\u89e3\u6c7a\u65b9\u6cd5\u4f9b\u7d66\u5176\u4ed6OEM\u7684\u958b\u767c\u8005\u53c3\u8003\uff0c\u56e0\u6b64\u5c31\u4e0d\u7d30\u8aaa\u5176\u904b\u4f5c\u539f\u7406\uff0c\u77e5\u9053\u7684\u4eba\u5c31\u77e5\u9053\u8981\u505a\u4ec0\u9ebc<br \/>\n\u4e0d\u904e\u9084\u662f\u8981\u611f\u8b1d\u5c0d\u5cb8\u7684\u4f5c\u8005\uff0c\u6211\u4e5f\u662f\u53c3\u8003\u5b83\u7684\u7bc4\u4f8b\u9032\u884c\u4fee\u6539\uff1ahttps:\/\/blog.csdn.net\/xct841990555\/article\/details\/80896429<br \/>\n<!--more--><br \/>\n\u9996\u5148partner\u7684\u6587\u4ef6\u6703\u6709\u8aaa\u660e\u8a72\u5982\u4f55\u5efa\u7f6ePAI\uff0c\u4e5f\u5f88\u8cbc\u5fc3\u7684\u9644\u4e0asample code\u8b93\u4f60\u76f4\u63a5\u7de8\u8b6f\u53c3\u8003<br \/>\n\u4f46\u5947\u8019\u7684\u662f\uff0c\u9019\u500bsample\u7adf\u7136\u7de8\u8b6f\u4e0d\u904e\uff0c\u800c\u4e14\u662f\u5404\u5f0f\u5404\u6a23\u7684\u932f\u8aa4\uff0c\u9996\u5148\u9047\u5230\u7684\u932f\u8aa4\u662f\u9019\u500b<\/p>\n<p>[c]error: vendor\/company\/PAI\/build_apk.mk: No such file or directory[\/c]<\/p>\n<p>\u6211\u53ea\u597d\u5427build_apk.mk\u7684\u5167\u5bb9\u76f4\u63a5\u5408\u4f75\u5230Android.mk\uff0c\u4f46\u537b\u53c8\u51fa\u73fe\u53e6\u5916\u65b0\u7684\u932f\u8aa4<\/p>\n<p>[c]FAILED: ninja: unknown target &#8216;MODULES-IN-PlayAutoInstallConfig'[\/c]<\/p>\n<p>\u76f4\u89ba\u61c9\u8a72\u662f\u8981\u6539\u6210Android.bp\uff0c\u4f46\u537b\u5728\u8f49\u63db\u7684\u6642\u5019\u767c\u73fegoogle\u63d0\u4f9b\u7684sample\u7684\u8a9e\u6cd5\u5f88\u591a\u90fd\u4e0d\u80fd\u8f49\u6210bp<\/p>\n<p>[c]<br \/>\nLOCAL_FULL_MANIFEST_FILE := $(LOCAL_PATH)\/stub\/AndroidManifest.xml<br \/>\nLOCAL_SOURCE_FILES_ALL_GENERATED := true<br \/>\n[\/c]<\/p>\n<p>\u6240\u4ee5\u53c3\u8003\u4e86\u5c0d\u5cb8\u4f5c\u8005\u5beb\u7684Android.mk\u7a0d\u4f5c\u4fee\u6539<br \/>\n<strong>Config<\/strong><\/p>\n<p>[c]<br \/>\nLOCAL_PATH := $(call my-dir)<br \/>\ninclude $(CLEAR_VARS)<br \/>\nLOCAL_PACKAGE_NAME := config-res<br \/>\nLOCAL_CERTIFICATE := platform<br \/>\nLOCAL_AAPT_FLAGS := -x<br \/>\nLOCAL_MODULE_TAGS := optional<br \/>\nLOCAL_EXPORT_PACKAGE_RESOURCES := true<br \/>\ninclude $(BUILD_PACKAGE)<br \/>\n[\/c]<\/p>\n<p>\u76ee\u9304\u7d50\u69cb\u5982\u4e0b\uff1a<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"https:\/\/lh3.googleusercontent.com\/pw\/AM-JKLVYJeyi3SWVb_1WAUExg5xrsTet8P6CRsyqpWarjDgq-F0P-hG9Cwa7DKujnjZt_BqKrHiIWyTa6uHATzwoDOuAFgbqDj-rDqpQXw0FWLXsxST9rW8bpAnpQWtpnFlpXSngGngePCX7SKpTz9wwV-6O=w411-h313-no?authuser=3\" alt=\"\" width=\"268\" height=\"204\" \/><\/p>\n<p>\u8f49\u6210Android.bp<\/p>\n<p>[c]<br \/>\nandroid_app {<br \/>\n    name: &quot;config-res&quot;,<br \/>\n    certificate: &quot;platform&quot;,<br \/>\n    aaptflags: [&quot;-x&quot;],<br \/>\n    sdk_version: &quot;current&quot;,<br \/>\n    export_package_resources: true,<br \/>\n}<br \/>\n[\/c]<\/p>\n<p><strong>Stub<\/strong><\/p>\n<p>[c]<br \/>\nLOCAL_PATH := $(call my-dir)<br \/>\ninclude $(CLEAR_VARS)<br \/>\nLOCAL_PACKAGE_NAME := stub-res<br \/>\nLOCAL_CERTIFICATE := platform<br \/>\nLOCAL_AAPT_FLAGS := -x<br \/>\nLOCAL_MODULE_TAGS := optional<br \/>\nLOCAL_EXPORT_PACKAGE_RESOURCES := true<br \/>\ninclude $(BUILD_PACKAGE)<br \/>\n[\/c]<\/p>\n<p>\u76ee\u9304\u7d50\u69cb\u5982\u4e0b\uff1a<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"https:\/\/lh3.googleusercontent.com\/pw\/AM-JKLX0_iR6HFhHgDhzMDmG6_pe5t4lsd1-XexcsWuoSrzT4y7Ue6bJ1b7qdbZrxsNz1TZVft96-N_I8YLnbGuAvv8mrn2pqplI9DefEIT0Nfcfpb0aYUpxY78dF5lJB7sOFDWX6YA5jNCHtUNXQtcrK4qm=w441-h527-no?authuser=3\" alt=\"\" width=\"277\" height=\"331\" \/><\/p>\n<p>\u8f49\u6210Android.bp<\/p>\n<p>[c]<br \/>\nandroid_app {<br \/>\n    name: &quot;stub-res&quot;,<br \/>\n    certificate: &quot;platform&quot;,<br \/>\n    aaptflags: [&quot;-x&quot;],<br \/>\n    platform_apis: true,<br \/>\n    export_package_resources: true,<br \/>\n}<br \/>\n[\/c]<\/p>\n<p>\u8a18\u5f97\u5c07res\u76f8\u95dc\u8cc7\u6599\u642c\u5230\u5c0d\u61c9\u7684\u8def\u5f91<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7531\u65bcGoogle\u6709\u660e\u78ba\u8aaa\u6b64\u6587\u4ef6\u70baConfidential material\uff0c\u4e5f\u56e0\u70ba\u5982\u6b64\uff0c\u7576\u4f7f\u7528\u76f8\u95dc\u6280\u8853\u7684\u958b\u767c\u6642<span class=\"post-excerpt-end\">&hellip;<\/span><\/p>\n<p class=\"more-link\"><a href=\"https:\/\/learn-house.idv.tw\/?p=3322\" class=\"themebutton\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-3322","post","type-post","status-publish","format-standard","hentry","category-5"],"_links":{"self":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/3322","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3322"}],"version-history":[{"count":0,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/3322\/revisions"}],"wp:attachment":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}