MAC安装AndroidStudio

下载地址:
​​​https://developer.android.google.cn/studio/​

创建工程

Kotlin教程-00helloworld_android

Kotlin教程-00helloworld_html_02

下载Gradle

下载地址:
​​​https://services.gradle.org/distributions/​

选择 ​​gradle-6.4.1-all.zip​​,开始下载

配置Gradle

Kotlin教程-00helloworld_下载地址_03

本地文件位置,生成文件夹及相应的哈希文件夹后,停止AndroidStudio的下载进程

~/.gradle/wrapper/dists/gradle-6.4.1-all

将下载好的gradle-6.4.1-all.zip放到对应的文件中并解压,如图所示

Kotlin教程-00helloworld_android_04


​gradle-wrapper.properties​​​ 文件配置完成后,点击 ​​Sync Now​

Kotlin教程-00helloworld_html_05

Kotlin教程-00helloworld_android_06


完成提示下面内容

Gradle Daemon started in 2 s 421 ms

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.4.1/userguide/command_line_interface.html#sec:command_line_warnings

CONFIGURE SUCCESSFUL in 33s

Control+R 运行工程

Kotlin教程-00helloworld_html_07