错误':android:transformKotlinClassesWithJillForDebug'。 构建用Kotlin + LibGDX编写的Android应用程序时

我正在使用LibGDX框架在Kotlin上开发游戏。 我在构建Android应用程序时遇到问题。 桌面和IOS( moe框架 )建立好。

这是完整的信息:

Error:A problem was found with the configuration of task ':android:transformKotlinClassesWithJillForDebug'. > File '/Users/maximternovtsi/bagel/android/build/tmp/kotlin-classes/debug.jar' specified for property 'inputJarFile' does not exist. 

我的build.gradle文件:

  buildscript { repositories { mavenLocal() mavenCentral() maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.3.3' classpath 'org.multi-os-engine:moe-gradle:1.3.6' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.1" } } allprojects { apply plugin: "eclipse" apply plugin: "idea" version = '1.0' ext { appName = "Bagel" gdxVersion = '1.9.6' } repositories { mavenLocal() mavenCentral() maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } maven { url "https://oss.sonatype.org/content/repositories/releases/" } } } project(":desktop") { apply plugin: "kotlin" dependencies { compile project(":core") compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" compile "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop" compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop" } } project(":android") { apply plugin: "android" apply plugin: "kotlin-android" configurations { natives } dependencies { compile project(":core") compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion" natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi" natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a" natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a" natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86" natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64" compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion" natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi" natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi-v7a" natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-arm64-v8a" natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86" natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86_64" compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion" natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi" natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi-v7a" natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-arm64-v8a" natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86" natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86_64" } } project(":core") { apply plugin: "kotlin" dependencies { compile "com.badlogicgames.gdx:gdx:$gdxVersion" compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion" compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion" compile "org.jetbrains.kotlin:kotlin-stdlib:1.1.1" compile "com.badlogicgames.ashley:ashley:1.7.0" // compile 'com.esotericsoftware:kryonet:2.22.0-RC1' // compile 'io.netty:netty-all:4.1.13.Final-SNAPSHOT' } } project(":ios-moe") { apply plugin: "moe" configurations { natives } dependencies { compile project(":core") compile "com.badlogicgames.gdx:gdx-backend-moe:$gdxVersion" natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios" natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-ios" natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-ios" } } tasks.eclipse.doLast { delete ".project" } 

也许我应该发表更多的代码。 我不知道还有什么可以帮助你。 只要写评论,我会告诉你你需要什么。 我从来没有遇到这样的问题。 谷歌也没有帮助。

首先,您需要将Kotlin版本1.1.1更新到1.1.51

比在Android依赖标签中添加kotlin-stdlib工件。

 compile "org.jetbrains.kotlin:kotlin-stdlib:1.1.51"