{"id":2404,"date":"2023-12-10T11:58:56","date_gmt":"2023-12-10T03:58:56","guid":{"rendered":"https:\/\/cocozq.com\/?p=2404"},"modified":"2023-12-10T11:58:56","modified_gmt":"2023-12-10T03:58:56","slug":"flutter%e6%8f%92%e4%bb%b6%e9%9b%86%e6%88%90android%e7%9a%84aar%e5%8c%85%e6%9c%80%e6%9c%89%e6%95%88%e6%96%b9%e6%a1%88","status":"publish","type":"post","link":"https:\/\/cocozq.com\/?p=2404","title":{"rendered":"Flutter\u63d2\u4ef6\u96c6\u6210Android\u7684aar\u5305\u6700\u6709\u6548\u65b9\u6848"},"content":{"rendered":"<p>\u6700\u8fd1\u5728\u5c01\u88c5\u4e00\u4e2a<code>Flutter<\/code>\u63d2\u4ef6\uff0c\u5728\u5bf9\u63a5\u539f\u751f<code>Android<\/code>\u7684\u65f6\u5019\u5f15\u5165\u4e86\u4e00\u4e9b\u7b2c\u4e09\u65b9\u7684<code>aar<\/code>\u5e93\uff0c\u8fc7\u7a0b\u4e2d\u53d1\u73b0\u4f7f\u7528<code>libs<\/code>\u6216\u8005<code>fatDir<\/code>\u7684\u65b9\u5f0f\u5bfc\u5165\u95ee\u9898\u5f88\u591a\uff0c\u867d\u7136\u5728<code>Android Studio<\/code>\u5355\u72ec\u6253\u5f00\u9879\u76ee\u7684\u65f6\u5019\u80fd\u6b63\u5e38\u8fd0\u884c\uff0c\u4f46\u662f\u4ee5<code>Flutter<\/code>\u5f62\u5f0f\u6253\u5f00\u9879\u76ee\u8fd0\u884c\u5404\u79cd\u62a5\u9519\uff0c\u8fd9\u4e9b\u9519\u8bef\u6211\u5bf9\u6bd4\u4e86\u4e00\u4e0b\u627e\u5230\u4e86\u95ee\u9898\u6240\u5728\uff0c\u57fa\u672c\u4e0a\u662f<code>Gradle<\/code>\u548c<code>JDK<\/code>\u7248\u672c\u5f15\u8d77\u7684\uff0c\u5982\u679c\u9047\u5230\u8fd9\u79cd\u95ee\u9898\uff0c\u6700\u597d\u4e0d\u8981\u53bb\u5c1d\u8bd5\u7f51\u4e0a\u7684\u90a3\u4e9b\u5404\u79cd\u65b9\u6848\u4e86\uff0c\u9996\u5148\u8981\u629b\u5f03\u76f4\u63a5\u5f15\u5165<code>aar<\/code>\u6587\u4ef6\u7684\u65b9\u5f0f\uff0c\u8fd9\u79cd\u5728\u6700\u65b0\u7684\u73af\u5883\u4e0b\u9762\u5df2\u7ecf\u88ab\u629b\u5f03\u4e86\uff0c\u6bd4\u5982\u62a5\u9519<\/p>\n<pre><code class=\"line-numbers\">Direct local .aar file dependencies are not supported when building an AAR...\n<\/code><\/pre>\n<p>\u5176\u6b21\u4ee5<code>module<\/code>\u65b9\u5f0f\u5f15\u5165\u4e5f\u4e0d\u63a8\u8350\uff0c\u56e0\u4e3a\u76ee\u524d\u5728<code>Flutter 3.16.2<\/code>\u548c<code>Android Studio 2023.3.1 Patch3<\/code>\u4e0a\uff0c\u5f15\u5165\u662f\u5b58\u5728\u95ee\u9898\u7684\uff0c\u5b98\u65b9\u5e94\u8be5\u90fd\u6ca1\u597d\u597d\u6d4b\u8bd5\u8fc7\uff0c\u6765\u56de\u6298\u817e\u53ea\u4f1a\u6d6a\u8d39\u65f6\u95f4\uff0c\u8fd8\u6709\u81ea\u5df1\u7f16\u5199<code>gradle<\/code>\u5f15\u5165\uff0c\u867d\u7136\u53ef\u884c\uff0c\u4f46\u662f\u6bd4\u8f83\u590d\u6742\uff0c\u6700\u6709\u6548\u7684\u65b9\u5f0f\u5c31\u662f\u81ea\u5df1\u7528<code>Nexus<\/code>\u521b\u5efa\u4e00\u4e2a<code>repo<\/code>\uff0c\u7136\u540e\u901a\u8fc7<code>Maven<\/code>\u76f4\u63a5\u4e0a\u4f20<code>aar<\/code>\uff0c\u518d\u5728\u9879\u76ee\u7684<code>gradle<\/code>\u901a\u8fc7<code>api<\/code>\u7684\u65b9\u5f0f\u5f15\u5165\u5c31\u884c\u4e86\uff0c\u5c31\u4e3a\u4e86\u8fd9\u70b9\u4e1c\u897f\u6d6a\u8d39\u4e86\u6211\u6574\u6574\u4e00\u5929\u7684\u65f6\u95f4\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u5728\u5c01\u88c5\u4e00\u4e2aFlutter\u63d2\u4ef6\uff0c\u5728\u5bf9\u63a5\u539f\u751fAndroid\u7684\u65f6\u5019\u5f15\u5165\u4e86\u4e00\u4e9b\u7b2c\u4e09\u65b9\u7684aar\u5e93\uff0c\u8fc7\u7a0b\u4e2d\u53d1\u73b0\u4f7f\u7528li &hellip; <a href=\"https:\/\/cocozq.com\/?p=2404\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Flutter\u63d2\u4ef6\u96c6\u6210Android\u7684aar\u5305\u6700\u6709\u6548\u65b9\u6848&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[97,143],"class_list":["post-2404","post","type-post","status-publish","format-standard","hentry","category-22","tag-android","tag-flutter","hfeed"],"_links":{"self":[{"href":"https:\/\/cocozq.com\/index.php?rest_route=\/wp\/v2\/posts\/2404","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cocozq.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cocozq.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cocozq.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cocozq.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2404"}],"version-history":[{"count":1,"href":"https:\/\/cocozq.com\/index.php?rest_route=\/wp\/v2\/posts\/2404\/revisions"}],"predecessor-version":[{"id":2405,"href":"https:\/\/cocozq.com\/index.php?rest_route=\/wp\/v2\/posts\/2404\/revisions\/2405"}],"wp:attachment":[{"href":"https:\/\/cocozq.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2404"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cocozq.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2404"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cocozq.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}