0

My android studio hasn't been working with the engine LibGDX for a while now. It took me 2 weeks to get the gradle to even build successfully by using a combination of outdated sdk's, gradle versions, and plugins. Upon running however, I'm greeted by this

enter image description here

absolutely lovely error that makes zero sense. Upon clicking the second link I'm brought to a file that nearly every single line has an error in it, same with the next link, and the link after that, and the link after that etc etc. I'm at an absolute loss considering the gradle settings are identical (except for the project name and the like) to an old project that runs perfectly fine. I don't know why this is happening, one day I just ran my app and this happened. I'm losing my mind at this point.

Please, any help is appreciated.

P.S It's not this error because my gradle is far below that (version 4.1)

here is my the code within my build.gradle file:

buildscript {

repositories {
    mavenLocal()
    mavenCentral()
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
    jcenter()
    google()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.0.1'


}

}

allprojects { apply plugin: "eclipse" apply plugin: "idea"

version = '1.0'
ext {
    appName = "Radiation Pigeon"
    gdxVersion = '1.9.7'
    roboVMVersion = '2.3.1'
    box2DLightsVersion = '1.4'
    ashleyVersion = '1.7.0'
    aiVersion = '1.8.0'
}

repositories {
    mavenLocal()
    mavenCentral()
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
    maven { url "https://oss.sonatype.org/content/repositories/releases/" }
    google()
}

}

project(":android") { apply plugin: "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"

}

}

project(":core") { apply plugin: "java"

dependencies {
    compile "com.badlogicgames.gdx:gdx:$gdxVersion"
    compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"

}

}

tasks.eclipse.doLast { delete ".project" }`

  • please share your `build.gradle` file of your project and android module – Abhishek Aryan Jul 09 '18 at 10:19
  • @Aryan I edited the build.gradle file code into my op but I couldn't get the code to format correctly so it's a little messy, sorry. –  Jul 09 '18 at 11:26
  • From your build file you're using `android-gradle plugin version 3.0.1`, check this [thread](https://stackoverflow.com/questions/51143740/android-studio-libgdx-gradle-sync-error/51147012#51147012). Downgrade `Gradle` and `android plugin for gradle` – Abhishek Aryan Jul 09 '18 at 12:25
  • I'm not sure it's the gradle that's the problem because I have a different project I made December last year that has the exact same gradle files and actually works, so would I be able to make a new project using my working project's files? –  Jul 09 '18 at 12:56
  • Your project is in VCS ?, If yes check how/what Andoid Studio updated your project :) – Abhishek Aryan Jul 09 '18 at 13:00

0 Answers0