# KotlinAndroid **Repository Path**: kassadin/KotlinAndroid ## Basic Information - **Project Name**: KotlinAndroid - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2017-10-20 - **Last Updated**: 2020-12-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## KotlinAndroid 粗糙的 Kotlin Demo ## Kotlin 学习资料 [Kotlin 官网](https://kotlinlang.org) [kotlin-koans](https://github.com/Kotlin/kotlin-koans) [Kotlin 中文网](http://kotlinlang.cn/) ## Kotlin Android [Kotlin for android Developers 中文翻译](https://www.gitbook.com/book/wangjiegulu/kotlin-for-android-developers-zh) [Android 还可以这样开发](http://zhuanlan.zhihu.com/kotandroid) [Kotlin AS 配置](https://kotlinlang.org/docs/tutorials/kotlin-android.html) ``` apply plugin: 'com.android.application' apply plugin: 'kotlin-android' android { ... sourceSets { main.java.srcDirs += 'src/main/kotlin' } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.1.1' compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" //anko compile 'org.jetbrains.anko:anko-sdk15:0.8.1' // sdk19, sdk21, sdk23 are also available compile 'org.jetbrains.anko:anko-support-v4:0.8.1' // In case you need support-v4 bindings compile 'org.jetbrains.anko:anko-appcompat-v7:0.8.1' // For appcompat-v7 bindings } buildscript { ext.kotlin_version = '1.0.0-beta-4589' repositories { mavenCentral() } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version' } } repositories { mavenCentral() } ``` 配置 kotlin-android-extensions 后,不用findViewById ``` textView.setText("Hello, world!") // Instead of findView(R.id.textView) as TextView ```