{"id":5273,"date":"2021-11-02T10:41:20","date_gmt":"2021-11-02T02:41:20","guid":{"rendered":"http:\/\/xinyiworld.top\/wordpress\/?p=5273"},"modified":"2021-11-05T15:05:35","modified_gmt":"2021-11-05T07:05:35","slug":"%e9%9b%86%e6%88%90kotlin%e7%8e%af%e5%a2%83","status":"publish","type":"post","link":"http:\/\/xinyiworld.top\/wordpress_it\/?p=5273","title":{"rendered":"\u96c6\u6210Kotlin\u73af\u5883"},"content":{"rendered":"<p>\u5982\u679c\u60f3\u5728AS\u4e0b\u7eafjava\u8bed\u8a00\u5f00\u53d1\u7684android\u5de5\u7a0b\u91cc\u5f15\u7528Kotlin\u8bed\u8a00\u8d44\u6e90\u5e93\uff0c\u9700\u8981\u914d\u7f6eKotlin\u73af\u5883\uff1a<\/p>\n<h2>\u4e00\u3001\u5728\u9879\u76ee\u6839gradle\u91cc\u5b9a\u4e49kotlin\u7248\u672c\u96c6\u6210\u63d2\u4ef6\u5e93<\/h2>\n<p>\u6ce8\u610f\u4e0d\u8981\u4f7f\u7528aliyun\u955c\u50cf\u5565\u7684\uff0c\u4e0d\u652f\u6301kotlin\u3002\u00b7<\/p>\n<pre><code class=\"language-groovy line-numbers\">buildscript {\n    ext.kotlin_version = \"1.5.10\"\n    dependencies {\n        classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version\"\n    }\n}\n\n<\/code><\/pre>\n<h2>\u4e8c\u3001\u5728module\u7684gradle\u91cc\u5f15\u7528Kotlin\u63d2\u4ef6<\/h2>\n<p>\u5982\u679c\u60f3\u5728\u67d0\u4e2amodule\u91cc\u5f15\u7528kotlin\u5e93\uff0c\u5c31\u914d\u7f6e\u8be5module\u7684gradle\u6587\u4ef6\u3002<\/p>\n<pre><code class=\"language-groovy line-numbers\">apply plugin: 'kotlin-android'\napply plugin: 'kotlin-android-extensions'\n\ndependencies {\n    implementation \"org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version\"\n}\n<\/code><\/pre>\n<button class=\"simplefavorite-button\" data-postid=\"5273\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"0\" style=\"\">\u6536\u85cf <i class=\"sf-icon-star-empty\"><\/i><\/button>","protected":false},"excerpt":{"rendered":"<p>\u5982\u679c\u60f3\u5728AS\u4e0b\u7eafjava\u8bed\u8a00\u5f00\u53d1\u7684android\u5de5\u7a0b\u91cc\u5f15\u7528Kotlin\u8bed\u8a00\u8d44\u6e90\u5e93\uff0c\u9700\u8981\u914d\u7f6eKotli [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[57],"tags":[],"_links":{"self":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/5273"}],"collection":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5273"}],"version-history":[{"count":2,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/5273\/revisions"}],"predecessor-version":[{"id":5489,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/5273\/revisions\/5489"}],"wp:attachment":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5273"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}