{"id":380,"date":"2022-05-16T08:19:39","date_gmt":"2022-05-16T00:19:39","guid":{"rendered":"http:\/\/usei.cn\/?p=380"},"modified":"2022-05-16T12:23:16","modified_gmt":"2022-05-16T04:23:16","slug":"flutter-%e7%8e%af%e5%a2%83%e9%85%8d%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/usei.cn\/index.php\/2022\/05\/16\/flutter-%e7%8e%af%e5%a2%83%e9%85%8d%e7%bd%ae\/","title":{"rendered":"Flutter \u73af\u5883\u914d\u7f6e"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"xZwMX\">\u4e00.Android \u914d\u7f6e<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"kpyVu\">1.\u5b89\u88c5Android Studio<\/h3>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"SXWUL\">2.\u4e0b\u8f7dSDK<\/h3>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"ipB4C\">3.\u5b89\u88c5 cmdline-tools<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>D:\\Android\\SDK\\tools\\bin\\sdkmanager --install \"cmdline-tools;latest\"<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"azjcK\">\u4e8c.\u5b89\u88c5 Visual Studio 2019+<\/h2>\n\n\n\n<p><a href=\"https:\/\/visualstudio.microsoft.com\/zh-hans\/downloads\/\">https:\/\/visualstudio.microsoft.com\/zh-hans\/downloads\/<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"AD8ER\">\u4e09.Flutter \u5b89\u88c5<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"xOJA7\">1.\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf<\/h3>\n\n\n\n<p id=\"u586a2f06\">\u7531\u4e8e\u5728\u56fd\u5185\u8bbf\u95eeFlutter\u6709\u65f6\u53ef\u80fd\u4f1a\u53d7\u5230\u9650\u5236\uff0cFlutter\u5b98\u65b9\u4e3a\u4e2d\u56fd\u5f00\u53d1\u8005\u642d\u5efa\u4e86\u4e34\u65f6\u955c\u50cf\uff0c\u5927\u5bb6\u53ef\u4ee5\u5c06\u5982\u4e0b\u73af\u5883\u53d8\u91cf\u52a0\u5165\u5230\u7528\u6237\u73af\u5883\u53d8\u91cf\u4e2d<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>export PUB_HOSTED_URL=https:\/\/pub.flutter-io.cn\nexport FLUTTER_STORAGE_BASE_URL=https:\/\/storage.flutter-io.cn<\/code><\/pre>\n\n\n\n<p id=\"uc97aad58\">\u63d0\u524d\u8bbe\u7f6e\u8fd9\u4e24\u4e2a\u73af\u5883\u53d8\u91cf\u4f1a\u907f\u514d\u4e0d\u5fc5\u8981\u7684\u9519\u8bef\uff0c\u6211\u4e4b\u524d\u6ca1\u914d\u8fd9\u8fde\u4e2a\u73af\u5883\u53d8\u91cf\uff0c\u5728\u6267\u884c flutter doctor \u547d\u4ee4\u7684\u65f6\u5019\u51fa\u73b0\u4e86 <strong>\u65e0\u6cd5\u8fde\u63a5\u5230\u8fdc\u7a0b\u670d\u52a1\u5668<\/strong> \u7684\u9519\u8bef\u3002<\/p>\n\n\n\n<p id=\"u40160228\">\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u5c06 flutter \u6dfb\u52a0\u5230\u201c\u7528\u6237\u53d8\u91cf\u201dPath\u201d\u7684\u6761\u76ee\u4e0b\u3002 Path \u8def\u5f84\uff1a\u63a7\u5236\u9762\u677f -&gt; \u7cfb\u7edf\u548c\u5b89\u5168 -&gt; \u7cfb\u7edf -&gt; \u9ad8\u7ea7\u7cfb\u7edf\u8bbe\u7f6e -&gt; \u73af\u5883\u53d8\u91cf\uff0cPath \u53d8\u91cf\u4e2d\u6dfb\u52a0 Flutter \u8def\u5f84\uff0c\u5230 \\bin \u7ea7\uff1b<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"jHhl1\">https:\/\/maven.google.com\/ is not reachable<\/h3>\n\n\n\n<p id=\"u9842cf81\">1\u3001\u627e\u5230flutter sdk\u7684\u6587\u4ef6\u76ee\u5f55\uff0c\u6253\u5f00flutter\\packages\\flutter_tools\\lib\\src\\http_host_validator.dart<\/p>\n\n\n\n<p id=\"u16962753\">2\u3001\u5c06<a href=\"https:\/\/links.jianshu.com\/go?to=https%3A%2F%2Fmaven.google.com%2F\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/maven.google.com\/<\/a> \u4fee\u6539\u4e3a<a href=\"https:\/\/links.jianshu.com\/go?to=https%3A%2F%2Fdl.google.com%2Fdl%2Fandroid%2Fmaven2%2F\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/dl.google.com\/dl\/android\/maven2\/<\/a><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u5220\u9664\/path-to-flutter-sdk\/bin\/cache \u6587\u4ef6\u5939<\/li><li>\u91cd\u65b0\u6267\u884cflutter doctor<\/li><\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"hV6Xg\">2.\u8fd0\u884c flutter doctor<\/h3>\n\n\n\n<p id=\"ue4d309b8\">\u914d\u7f6e\u597d\u73af\u5883\u53d8\u91cf\u540e\uff0c\u6253\u5f00\u4e00\u4e2a\u65b0\u7684\u547d\u4ee4\u63d0\u793a\u7b26\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u67e5\u770b\u662f\u5426\u9700\u8981\u5b89\u88c5\u4efb\u4f55\u4f9d\u8d56\u9879\u6765\u5b8c\u6210\u5b89\u88c5<\/p>\n\n\n\n<p id=\"u7dc6f707\"><a rel=\"noreferrer noopener\" href=\"https:\/\/flutterchina.club\/)\" target=\"_blank\"><\/a><a rel=\"noreferrer noopener\" href=\"https:\/\/blog.csdn.net\/jiangbw415\/article\/details\/82993808\" target=\"_blank\"><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00.Android \u914d\u7f6e 1.\u5b89\u88c5Android Studio 2.\u4e0b\u8f7dSDK 3.\u5b89\u88c5 cmdline-to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[50,8],"tags":[],"class_list":["post-380","post","type-post","status-publish","format-standard","hentry","category-flutter","category-frontend"],"_links":{"self":[{"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/posts\/380","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/comments?post=380"}],"version-history":[{"count":2,"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/posts\/380\/revisions"}],"predecessor-version":[{"id":382,"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/posts\/380\/revisions\/382"}],"wp:attachment":[{"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/media?parent=380"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/categories?post=380"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/tags?post=380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}