{"id":136,"date":"2023-08-27T06:46:46","date_gmt":"2023-08-27T06:46:46","guid":{"rendered":"https:\/\/shiri.cyou\/?p=136"},"modified":"2024-10-11T01:39:42","modified_gmt":"2024-10-11T01:39:42","slug":"%e8%ae%b0%e5%bd%95%e6%90%ad%e5%bb%bareact-native%e7%8e%af%e5%a2%83%e6%97%b6%e9%81%87%e5%88%b0%e7%9a%84%e5%87%a0%e4%b8%aa%e5%9d%91","status":"publish","type":"post","link":"https:\/\/shiri.dev\/?p=136","title":{"rendered":"\u8bb0\u5f55\u642d\u5efaReact Native\u73af\u5883\u65f6\u9047\u5230\u7684\u51e0\u4e2a\u5751"},"content":{"rendered":"<h2>\u4e00\u3001JDK\u7248\u672c\u95ee\u9898<\/h2>\n<p>\u7531\u4e8e\u4e4b\u524d\u5f00MC\u670d\u52a1\u5668\u65f6\u5b89\u88c5\u8fc7Java1.20.x\u7248\u672c\uff0c\u540e\u9762\u5728\u88c5Android SDK\u65f6\u5c31\u6ca1\u6ce8\u610f\u5b89\u88c5\u76f8\u5e94\u7684JDK\u7248\u672c\uff0c\u5bfc\u81f4\u7528<code>yarn android<\/code>\u542f\u52a8\u65f6\u62a5\u9519<\/p>\n<p>\u9519\u8bef\u4fe1\u606f\uff1a<code> BUG! exception in phase 'semantic analysis' in source unit '<em>BuildScript<\/em>' Unsupported class file major version 64<\/code><\/p>\n<p>\u67e5\u4e86\u4e00\u4f1a\u53d1\u73b0\u662fJAVA\u7248\u672c\u8fc7\u9ad8\u5bfc\u81f4\u7684\uff0c\u964d\u7ea7\u62101.17.8\u540e\u91cd\u65b0\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u5373\u53ef<\/p>\n<h2>\u4e8c\u3001Andriod SDK\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u95ee\u9898<\/h2>\n<p>\u4e00\u4e2a\u4f4e\u7ea7\u9519\u8bef= =\uff0c\u5b98\u65b9\u6587\u6863\u4e2d\u5df2\u7ecf\u5199\u4e86\u8981\u914d\u7f6e\u8fd9\u4e9b\u53d8\u91cf\uff1a<\/p>\n<pre><code class=\"language-javascript\">%ANDROID_HOME%\\platform-tools\n%ANDROID_HOME%\\emulator\n%ANDROID_HOME%\\tools\n%ANDROID_HOME%\\tools\\bin<\/code><\/pre>\n<p>\u81ea\u5df1\u914d\u7f6e\u65f6\u6f0f\u4e86\u4e00\u4e2a<code>%ANDROID_HOME%\\emulator<\/code>\uff0c\u5bfc\u81f4\u542f\u52a8\u65f6\u65e0\u6cd5\u627e\u5230\u5b89\u5353\u6a21\u62df\u5668\uff0c\u53c8\u62a5\u9519\uff0c\u52a0\u4e0a\u540e\u89e3\u51b3<\/p>\n<h2>\u4e09\u3001Andriod Studio\u4e0b\u8f7d\u901f\u5ea6\u8fc7\u6162<\/h2>\n<p>\u867d\u7136\u4e00\u5f00\u59cb\u5c31\u77e5\u9053Android\u5f00\u53d1\u9700\u8981\u5408\u7406\u4e0a\u7f51\uff0c\u4e0bSDK\u901f\u5ea6\u633a\u5feb\u7684\uff0c\u4f46\u4e0b\u4f9d\u8d56\u7684\u901f\u5ea6\u8fd8\u662f\u5f88\u6162\uff0c\u5bfc\u81f4\u7b49\u4e86\u4e24\u4e2a\u5c0f\u65f6\u5feb\u4e0b\u8f7d\u5b8c\u4f9d\u8d56\u7684\u65f6\u5019\u7f51\u7edc\u8d85\u65f6\uff0c\u53c8\u5f97\u91cd\u65b0\u4e0b\uff0c\u56e0\u4e3a\u4e0d\u613f\u610f\u518d\u7b49\u4e24\u4e2a\u5c0f\u65f6\uff0c\u9042\u67e5\u627e\u89e3\u51b3\u65b9\u6cd5\uff0c\u53d1\u73b0gradle\u4ed3\u5e93\u6e90\u53ef\u4ee5\u5728\u9879\u76ee\u91cc\u914d\u7f6e<\/p>\n<p>\u5c06\/android\/build.gradle\u4e2d\u7684<\/p>\n<pre><code class=\"language-javascript\">repositories {\n    google()\n    mavenCentral()\n}<\/code><\/pre>\n<p>\u52a0\u4e0a\u4e24\u884c\u66ff\u6362\u4e3a\u963f\u91cc\u4e91\u6e90<\/p>\n<pre><code class=\"language-javascript\">repositories {\n    maven{url &#039;https:\/\/maven.aliyun.com\/repository\/google&#039;}\n    maven{url &#039;https:\/\/maven.aliyun.com\/repository\/public&#039;}\n    google()\n    mavenCentral()\n}<\/code><\/pre>\n<p>\u52a0\u4e0a\u540e\u53ef\u76f4\u63a5\u4e0b\u8f7d(\u4e5f\u4e0d\u662f\u5f88\u5feb\u4f46\u8fd8\u80fd\u63a5\u53d7)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001JDK\u7248\u672c\u95ee\u9898 \u7531\u4e8e\u4e4b\u524d\u5f00MC\u670d\u52a1\u5668\u65f6\u5b89\u88c5\u8fc7Java1.20.x\u7248\u672c\uff0c\u540e\u9762\u5728\u88c5Android S&hellip; <a href=\"https:\/\/shiri.dev\/?p=136\" class=\"more-link read-more\" rel=\"bookmark\">\u7ee7\u7eed\u9605\u8bfb <span class=\"screen-reader-text\">\u8bb0\u5f55\u642d\u5efaReact Native\u73af\u5883\u65f6\u9047\u5230\u7684\u51e0\u4e2a\u5751<\/span><i class=\"fa fa-arrow-right\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":{"0":"post-136","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-uncategorized","7":"h-entry","9":"h-as-article"},"_links":{"self":[{"href":"https:\/\/shiri.dev\/index.php?rest_route=\/wp\/v2\/posts\/136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shiri.dev\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shiri.dev\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shiri.dev\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shiri.dev\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=136"}],"version-history":[{"count":4,"href":"https:\/\/shiri.dev\/index.php?rest_route=\/wp\/v2\/posts\/136\/revisions"}],"predecessor-version":[{"id":315,"href":"https:\/\/shiri.dev\/index.php?rest_route=\/wp\/v2\/posts\/136\/revisions\/315"}],"wp:attachment":[{"href":"https:\/\/shiri.dev\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shiri.dev\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shiri.dev\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}