Gradle 的变迁,以前长这个样子 ÒÒÒ tip 技巧 kotlin

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

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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 技巧:

布局检查器

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值