Kotlin库'rxkotlin-0.21.0.jar'具有不受支持的格式。 请更新库或插件

标题中的错误出现在Android Studio中,作为警告栏,高于我的所有代码: 错误

Android Studio版本: 1.1.0
Android Studio的Kotlin插件版本: 0.11.91.AndroidStudio.4
build.gradle文件似乎正在使用所有最新版本的Kotlin库:

 apply plugin: 'com.android.application' apply plugin: 'kotlin-android' android { compileSdkVersion 22 buildToolsVersion "22.0.1" defaultConfig { applicationId "ca.amandeep.simpletransit" minSdkVersion 16 targetSdkVersion 22 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } sourceSets { main.java.srcDirs += 'src/main/kotlin' } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:22.0.0' compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" compile 'com.squareup.retrofit:retrofit:1.9.0' compile('com.squareup.retrofit:converter-simplexml:1.9.0') { exclude module: 'stax' exclude module: 'stax-api' exclude module: 'xpp3' } compile 'com.squareup.okhttp:okhttp:2.3.0' compile 'com.squareup.okhttp:okhttp-urlconnection:2.3.0' compile 'com.google.guava:guava:18.0' compile 'com.facebook.stetho:stetho:1.0.1' compile 'com.facebook.stetho:stetho-okhttp:1.0.1' compile 'com.jakewharton.timber:timber:2.7.1' compile 'io.reactivex:rxkotlin:0.21.0' compile 'io.reactivex:rxandroid:0.24.0' compile 'com.github.techfreak:wizardpager:1.0.0' } buildscript { ext.kotlin_version = '0.11.91.1' repositories { mavenCentral() } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version" classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1' } } repositories { mavenCentral() } apply plugin: 'com.jakewharton.hugo' 

我想他们错误地打包了这个版本。 在github上有一个问题:

https://github.com/ReactiveX/RxKotlin/issues/18

也许你应该平静下来。

Kotlin M12的RxKotlin发行版解决了此问题。 这不再是一个问题。

关于错误消息…

当Kotlin创建的类文件的ABI版本号与Kotlin编译器使用的期望值不匹配时,出现“不支持的格式”错误。 这不再是Kotlin 1.0 Betas的一个问题,因为ABI号码不会再改变1.0。 但是,在1.0版本的候选版本中将会有一个强制重新编译,以确保没有旧的编译器错误影响库或代码,并且所有内容都被重建为干净的。 之后就不存在这样的问题了。

因此,如果一个库不是最新的ABI,或者最后一个“1.0重新编译”,你可能会遇到类似的错误。 解决方案总是找到更新的库。

更多关于Kotlin 1.0 Beta 4公告 “下一步”部分的内容:

Beta期结束后,会有一个RC,然后是1.0。

我们确实希望确保在1.0之前没有使用预发布版本的Kotlin编译的代码,因此RC编译器将强制重新编译所有旧代码。 我们将与JetBrains之外的库维护者进行协调,以确保所有广泛使用的库能够及时重新编译。

在这一点上,我们也将借此机会删除一些遗产:

  • 消除我们在图书馆发展过程中积累的所有弃用,
  • 从生成的代码中删除所有的弃用(你可能没有听说过这些,但它们存在!),
  • 摆脱beta版期间发现的遗留字节码特性,
  • 移动一些stdlib代码,使包里有更多的结构。

之后,标准库的唯一兼容更改是弃用和添加(这不包括反射API)。 我们正在对图书馆API进行一次公开审查,以确保我们没有漏掉任何重要的事情。