Kotlin NoClassDefFoundError异常

出现异常 java.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/jvm/internal/Intrinsics



网上有人说添加   

compile 'com.mapzen:on-the-road:0.8.1

测试会报其他异常或错误

解决办法

Kotlin NoClassDefFoundError异常_第1张图片

默认会在 app build.gradle 添加

dependencies{

    compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

}

repositories {
    mavenCentral()
}


然后同步(sync Now)

如果出现

Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.

It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

将 compile 修改为 implementation 

同步(sync Now) 编译正常显示

你可能感兴趣的:(Kotlin,学习)