Unresolved reference: endsWith Error in below code
var baseUrl = "http://api.foobar.com/v1"
if (!baseUrl.endsWith("/"))
baseUrl = baseUrl + "/"
What is the cause?
There was no problem when it was use 1.1.60.
Below is build.gradle
buildscript {
ext.kotlin_version = '1.2.0'
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
android {
//...
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
}