apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "com.raywenderlich.android.drawingcustomshapes"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
// Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
// Support Libraries
implementation 'androidx.appcompat:appcompat:1.1.0'
// Testing Dependencies
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
tip 技巧 kotlin:
string 插值,
interpolation
然后 log
Log.i("hahah","hehehehe ${recipes.length()}")
debug 技巧:
布局检查器

Kotlin Android App开发:字符串插值与调试技巧
这篇博客介绍了如何在Android应用中使用Kotlin进行字符串插值,并展示了如何利用Log进行调试。此外,还提到了Android Studio的布局检查器作为提升开发效率的工具。
140

被折叠的 条评论
为什么被折叠?



