【问题标题】:Error ':android:transformKotlinClassesWithJillForDebug'. When building Android application written in Kotlin + LibGDX错误':android:transformKotlinClassesWithJillForDebug'。在构建用 Kotlin + LibGDX 编写的 Android 应用程序时
【发布时间】:2018-04-06 17:44:16
【问题描述】:

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

这是完整的消息:

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"
 }

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

【问题讨论】:

    标签: android gradle build libgdx kotlin


    【解决方案1】:

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

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-06
      • 2021-07-04
      • 2019-09-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多