未解决的参考:kotlinx - Kotlin 1-0-0-rc-1036
Unresolved reference: kotlinx - Kotlin 1-0-0-rc-1036
我在 Android 应用程序中工作,几天前我将我的 Kotlin 版本从 1.0.0-beta-1103 更新为候选发布版 1.0.0-rc-1036 现在我无法 运行 我的应用程序用于与 Kotlin Android 扩展相关的东西。
我使用 apply plugin: 'kotlin-android-extensions'
就像官方博客所说 http://blog.jetbrains.com/kotlin/2016/02/kotlin-1-0-release-candidate-is-out/ 但我的应用程序无法识别任何布局的任何视图。
这是控制台上显示的内容:
Error:(20, 8) Unresolved reference: kotlinx
Error:Execution failed for task ':app:compileDebugKotlin'.
Compilation error. See log for more details
请帮帮我,我快疯了!
更新:
这是我在全局中的 buildScriptbuild.gradle
buildscript {
ext {
kotlin_version = "1.0.0-rc-1036"
}
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// The Fabric Gradle plugin uses an open ended version to react
// quickly to Android tooling updates
classpath 'io.fabric.tools:gradle:1.+'
}
}
应用程序中列出的依赖项build.gradle
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
// Google
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:cardview-v7:23.1.0'
compile 'com.android.support:design:23.1.0'
compile 'com.android.support:recyclerview-v7:23.1.0'
// Kotlin
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
// Square
compile 'com.squareup.okio:okio:1.5.0'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.0.0'
compile 'com.squareup.okhttp:okhttp:2.0.0'
compile 'com.squareup.picasso:picasso:2.5.2'
// ReactiveX
compile 'io.reactivex:rxjava:1.0.14'
compile 'io.reactivex:rxandroid:1.0.1'
compile 'com.jakewharton.rxbinding:rxbinding:0.3.0'
compile 'com.jakewharton.rxbinding:rxbinding-support-v4:0.2.0'
// DBFlow
kapt 'com.raizlabs.android:DBFlow-Compiler:2.2.1'
compile "com.raizlabs.android:DBFlow-Core:2.2.1"
compile "com.raizlabs.android:DBFlow:2.2.1"
// Otros
compile 'de.hdodenhof:circleimageview:1.3.0'
// SQLite Assets Helper
compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:2.0.1'
// Crashlytics Kit
compile('com.crashlytics.sdk.android:crashlytics:2.5.2@aar') {
transitive = true
}
}
这是我正在使用的导入:
import kotlinx.android.synthetic.main.activity_all_quizzes.*
您的 kotlin stdlib 编译依赖项应该(至少在不稳定时)与 kotlin android studio 插件版本相同
...
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
...
buildscript {
ext.kotlin_version = '1.0.0-rc-1036'
...
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
现在应该在项目本地 build.gradle
文件中定义。
我在 Android 应用程序中工作,几天前我将我的 Kotlin 版本从 1.0.0-beta-1103 更新为候选发布版 1.0.0-rc-1036 现在我无法 运行 我的应用程序用于与 Kotlin Android 扩展相关的东西。
我使用 apply plugin: 'kotlin-android-extensions'
就像官方博客所说 http://blog.jetbrains.com/kotlin/2016/02/kotlin-1-0-release-candidate-is-out/ 但我的应用程序无法识别任何布局的任何视图。
这是控制台上显示的内容:
Error:(20, 8) Unresolved reference: kotlinx
Error:Execution failed for task ':app:compileDebugKotlin'.
Compilation error. See log for more details
请帮帮我,我快疯了!
更新:
这是我在全局中的 buildScriptbuild.gradle
buildscript {
ext {
kotlin_version = "1.0.0-rc-1036"
}
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// The Fabric Gradle plugin uses an open ended version to react
// quickly to Android tooling updates
classpath 'io.fabric.tools:gradle:1.+'
}
}
应用程序中列出的依赖项build.gradle
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
// Google
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:cardview-v7:23.1.0'
compile 'com.android.support:design:23.1.0'
compile 'com.android.support:recyclerview-v7:23.1.0'
// Kotlin
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
// Square
compile 'com.squareup.okio:okio:1.5.0'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.0.0'
compile 'com.squareup.okhttp:okhttp:2.0.0'
compile 'com.squareup.picasso:picasso:2.5.2'
// ReactiveX
compile 'io.reactivex:rxjava:1.0.14'
compile 'io.reactivex:rxandroid:1.0.1'
compile 'com.jakewharton.rxbinding:rxbinding:0.3.0'
compile 'com.jakewharton.rxbinding:rxbinding-support-v4:0.2.0'
// DBFlow
kapt 'com.raizlabs.android:DBFlow-Compiler:2.2.1'
compile "com.raizlabs.android:DBFlow-Core:2.2.1"
compile "com.raizlabs.android:DBFlow:2.2.1"
// Otros
compile 'de.hdodenhof:circleimageview:1.3.0'
// SQLite Assets Helper
compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:2.0.1'
// Crashlytics Kit
compile('com.crashlytics.sdk.android:crashlytics:2.5.2@aar') {
transitive = true
}
}
这是我正在使用的导入:
import kotlinx.android.synthetic.main.activity_all_quizzes.*
您的 kotlin stdlib 编译依赖项应该(至少在不稳定时)与 kotlin android studio 插件版本相同
...
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
...
buildscript {
ext.kotlin_version = '1.0.0-rc-1036'
...
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
现在应该在项目本地 build.gradle
文件中定义。