I am trying to setup a libGdx with eclipse using this tutorial
but when I try to build the project I got this error
Configuration on demand is an incubating feature.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'TestGame'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve de.richsource.gradle.plugins:gwt-gradle-plugin:0.5.
Required by:
:TestGame:unspecified
> Could not GET 'https://repo1.maven.org/maven2/de/richsource/gradle/plugins/gwt-gradle-plugin
/0.5/gwt-gradle-plugin-0.5.pom'.
> Connection to https://repo1.maven.org refused
> Could not GET 'https://jcenter.bintray.com/de/richsource/gradle/plugins/gwt-gradle-plugin/0.
5/gwt-gradle-plugin-0.5.pom'.
> Connection to https://jcenter.bintray.com refused
> Could not resolve com.android.tools.build:gradle:0.13+.
Required by:
:TestGame:unspecified
> Failed to list versions for com.android.tools.build:gradle.
> Unable to load Maven meta-data from https://repo1.maven.org/maven2/com/android/tools/buil
d/gradle/maven-metadata.xml.
> Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/maven-met
adata.xml'.
> Connection to https://repo1.maven.org refused
> Failed to list versions for com.android.tools.build:gradle.
> Unable to load Maven meta-data from https://jcenter.bintray.com/com/android/tools/build/g
radle/maven-metadata.xml.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/maven-metada
ta.xml'.
> Connection to https://jcenter.bintray.com refused
> Could not resolve org.robovm:robovm-gradle-plugin:1.0.0-alpha-04.
Required by:
:TestGame:unspecified
> Could not GET 'https://repo1.maven.org/maven2/org/robovm/robovm-gradle-plugin/1.0.0-alpha-04
/robovm-gradle-plugin-1.0.0-alpha-04.pom'.
> Connection to https://repo1.maven.org refused
> Could not GET 'https://jcenter.bintray.com/org/robovm/robovm-gradle-plugin/1.0.0-alpha-04/ro
bovm-gradle-plugin-1.0.0-alpha-04.pom'.
> Connection to https://jcenter.bintray.com refused
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more l
og output.
BUILD FAILED
Total time: 2 mins 12.602 secs
And the libGDX ui generated this build gradle file
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.5'
classpath 'com.android.tools.build:gradle:0.13+'
classpath 'org.robovm:robovm-gradle-plugin:1.0.0-alpha-04'
}
}
allprojects {
apply plugin: "eclipse"
apply plugin: "idea"
version = '1.0'
ext {
appName = 'TestingGame'
gdxVersion = '1.4.1'
roboVMVersion = '1.0.0-alpha-04'
}
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
}
}
project(":desktop") {
apply plugin: "java"
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"
}
}
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-x86"
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-x86"
compile "com.badlogicgames.box2dlights:box2dlights:1.2"
}
}
project(":ios") {
apply plugin: "java"
apply plugin: "robovm"
configurations { natives }
dependencies {
compile project(":core")
compile "org.robovm:robovm-rt:${roboVMVersion}"
compile "org.robovm:robovm-cocoatouch:${roboVMVersion}"
compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-ios"
}
}
project(":html") {
apply plugin: "gwt"
apply plugin: "war"
dependencies {
compile project(":core")
compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion"
compile "com.badlogicgames.gdx:gdx:$gdxVersion:sources"
compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources"
compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion:sources"
compile "com.badlogicgames.gdx:gdx-box2d-gwt:$gdxVersion:sources"
compile "com.badlogicgames.box2dlights:box2dlights:1.2:sources"
}
}
project(":core") {
apply plugin: "java"
dependencies {
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
compile "com.badlogicgames.box2dlights:box2dlights:1.2"
}
}
tasks.eclipse.doLast {
delete ".project"
}
I Know Maven but I don't know gradle so I can't understand the exception and where I've gone wrong even I did everything in the tutorial, any help please?
After a lot of searching i found that i need to add the GWT that i downloaded to the eclipse plugin and that was not mentioned in the tutorial
so what i did is
in eclipse go to WINDOWS --->PREFERENCE--->GOOGLE ---->WEB TOOLKIT --->add and search for the folder you have extracted its ZIP file
I had a similar problem with Gradle (Could not GET 'https...) but with a different project. I'm behind a firewall as well
I tried using a separate gradle.properties and also tried passing the proxy server/port to gradle via the VM arguments as mentioned by some other posts on SO but neither of those worked
Here's a way I found via Eclipse settings that worked for me
Under Window->Preferences->Network Connections set the Active Provider to Manual
.
Then edit the entries for HTTP and HTTPS and add the proxy server and port there. If your proxy needs your credentials make sure you add those there as well. Try building it again and hopefully it works this time
Related
I have a spring boot project and I get this error when I try to build it:
> gradle build
:processResources
:compileJava
:classes
:jar FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':jar'.
> archive contains more than 65535 entries.
To build this archive, please enable the zip64 extension.
See: https://docs.gradle.org/3.5.1/dsl/org.gradle.api.tasks.bundling.Zip.html#org.gradle.api.tasks.bundling.Zip:zip64
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Ok, I added the zip64 = true option to the jar task in the gradle configuration.
Now it can build the jar successfully but when I try to execute the jar, I get the following exception:
Exception in thread "main" java.lang.IllegalStateException: java.lang.IndexOutOfBoundsException
at org.springframework.boot.loader.ExecutableArchiveLauncher.<init>(ExecutableArchiveLauncher.java:43)
at org.springframework.boot.loader.JarLauncher.<init>(JarLauncher.java:37)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:58)
Caused by: java.lang.IndexOutOfBoundsException
at org.springframework.boot.loader.jar.AsciiBytes.<init>(AsciiBytes.java:69)
at org.springframework.boot.loader.jar.CentralDirectoryFileHeader.load(CentralDirectoryFileHeader.java:95)
at org.springframework.boot.loader.jar.CentralDirectoryParser.parseEntries(CentralDirectoryParser.java:68)
at org.springframework.boot.loader.jar.CentralDirectoryParser.parse(CentralDirectoryParser.java:57)
at org.springframework.boot.loader.jar.JarFile.<init>(JarFile.java:118)
at org.springframework.boot.loader.jar.JarFile.<init>(JarFile.java:106)
at org.springframework.boot.loader.jar.JarFile.<init>(JarFile.java:92)
at org.springframework.boot.loader.jar.JarFile.<init>(JarFile.java:83)
at org.springframework.boot.loader.archive.JarFileArchive.<init>(JarFileArchive.java:61)
at org.springframework.boot.loader.archive.JarFileArchive.<init>(JarFileArchive.java:57)
at org.springframework.boot.loader.Launcher.createArchive(Launcher.java:129)
at org.springframework.boot.loader.ExecutableArchiveLauncher.<init>(ExecutableArchiveLauncher.java:40)
... 2 more
It turned out that SpringBoot doesn't even support the zip64 format, so I had to make further investigation.
Where do the 65535+ entries come from? Obviously these come from dependencies, because the issue exists since
I added a new dependency in the build.gradle file. While examining the zip64 jar, I have found that
all the dependency classes! are under the BOOT-INF/classes folder.
As I understand, the structure must look like
BOOT-INF/
classes/
<only this application's compiled classes>
libs/
<all the dependency jars>
But my classes folder has all the dependency jars "extracted" to it.
(As you can see)
I extracted the jar, removed all the dependency classes from this folder and rezipped it. (Like this)
This way it can be run without any problem, so I'm sure these files are unneccesary.
Can somebody help me, how to exclude these dependency classes from the structure? Thank you in advance!
Here's my relevant gradle configuration:
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'application'
apply plugin: 'org.springframework.boot'
ext.springBootVersion = '1.4.2.RELEASE'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.4.2.RELEASE")
}
}
configurations {
provided.all*.exclude group: 'javax.servlet'
}
mainClassName = 'com.path.to.my.MainClass'
repositories {
mavenCentral()
maven {
url "https://repository.jboss.org/nexus/content/repositories/releases"
}
maven {
url "https://repo.eclipse.org/content/groups/releases/"
}
}
jar {
//zip64 = true
from {
configurations.compile.collect {
it.isDirectory() ? it : zipTree(it)
}
}
manifest {
attributes("Main-Class": mainClassName)
}
exclude 'META-INF/*.RSA', 'META-INF/*.SF','META-INF/*.DSA'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile 'aopalliance:aopalliance:1.0'
compile 'com.google.code.gson:gson:2.7'
compile 'com.google.gdata:core:1.47.1'
compile 'com.google.guava:guava:19.0'
compile 'commons-io:commons-io:2.4'
compile 'javax.json:javax.json-api:1.0'
compile 'mysql:mysql-connector-java:5.1.22'
compile 'org.apache.commons:commons-csv:1.4'
compile 'org.flywaydb:flyway-core:4.0.3'
compile 'org.glassfish:javax.json:1.0.4'
......
testCompile 'org.springframework.boot:spring-boot-starter-test'
}
bootRun {
addResources = true
}
task wrapper(type: Wrapper) {
gradleVersion = '2.3'
}
I am trying to build a web application server using WildFly Swarm and the application has to be able to run another Java program inside (I don't want to run it as an external process). I am trying to include the external program as .jar dependency to my web application, however, wildfly-swarm-package task always fails with the following:
:clean
:compileJava
:processResources UP-TO-DATE
:classes
:war
:wildfly-swarm-package FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':wildfly-swarm-package'.
> java.lang.NullPointerException (no error message)
This is my gradle.build file:
buildscript {
version = System.getProperty('swarmVersion') ?: '2016.10.0'
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath "io.spring.gradle:dependency-management-plugin:0.5.6.RELEASE"
classpath "org.wildfly.swarm:wildfly-swarm-plugin:$version"
}
}
apply plugin: "io.spring.dependency-management"
apply plugin: 'wildfly-swarm'
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'war'
//mainClassName = 'org.siret.prank.webapp.rest.Main'
swarm {
properties {
swarm.http.port = 8181
}
}
repositories {
mavenLocal()
mavenCentral()
maven {
url 'https://maven.repository.redhat.com/nexus/content/repositories/releases/'
}
maven {
url 'https://maven.repository.redhat.com/nexus/content/repositories/thirdparty-releases/'
}
flatDir {
dirs 'libs'
}
}
dependencyManagement {
imports {
mavenBom "org.wildfly.swarm:bom-all:$version"
}
}
dependencies {
compile group: 'org.biojava', name: 'biojava-core', version: '4.2.4'
compile group: 'org.biojava', name: 'biojava-structure', version: '4.2.4'
compile "org.wildfly.swarm:jaxrs"
compile group: 'org.wildfly.swarm', name: 'undertow', version: '2016.10.0'
compile 'org.codehaus.groovy:groovy-all:2.4.7'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile fileTree(dir: 'libs/lib', include: ['*.jar'])
}
task debugJar(dependsOn:"wildfly-swarm-package") << {
javaexec {
main="-jar";
args=[
"-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5006",
"build/libs/prank-webapp-swarm.jar"
]
}
}
task runJar(dependsOn:"wildfly-swarm-package") << {
javaexec {
main="-jar";
args=[
"build/libs/prank-webapp-swarm.jar"
]
}
}
War plugin works fine, I can find the jars in WEB-INF/lib directory in the archive.
As an experiment, I tried to empty the libs folder and the error still persists.
Thanks,
Lukas
I migrated to Maven to find out that importing jar to local maven repository is the answer to the problem.
Now, both Maven an Gradle work.
I am using libgdx pay for Android and iOS, and was until recently able to test my application in desktop mode.
Since upgrading to IntelliJ 2016.1, I now receive the following error only when trying to run the desktop application; both iOS and Android continue to compile and run successfully.
The error:
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: java.lang.NoClassDefFoundError: com/badlogic/gdx/pay/PurchaseObserver
My build.gradle file for the desktop and core modules looks as below;
allprojects {
apply plugin: "eclipse"
apply plugin: "idea"
version = '1.0'
ext {
appName = '####'
gdxVersion = '1.9.2'
roboVMVersion = '1.8.0'
box2DLightsVersion = '1.4'
ashleyVersion = '1.4.0'
aiVersion = '1.5.0'
gdxpayVersion = '0.6.0'
}
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
}
}
project(":core") {
apply plugin: "java"
dependencies {
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
compile "de.tomgrill.gdxtwitter:gdx-twitter-core:0.1.0-SNAPSHOT"
compile "com.badlogicgames.gdxpay:gdx-pay:$gdxpayVersion"
compile "com.badlogicgames.gdxpay:gdx-pay-client:$gdxpayVersion"
}
}
project(":desktop") {
apply plugin: "java"
dependencies {
compile project(":core")
compile "de.tomgrill.gdxtwitter:gdx-twitter-desktop:0.1.0-SNAPSHOT"
compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
}
}
Furthermore, within IntelliJ it reports no error in being able to import the PurchaseObserver, it only occurs when I try to run the application.
Any help would be appreciated.
This is a known bug of IntelliJ itself, which is summarised here http://www.badlogicgames.com/forum/viewtopic.php?f=11&t=21148&hilit=intellij
The bug IntelliJ issue can be found here
https://youtrack.jetbrains.com/issue/IDEA-147788
The bug only occurs when there is also an Android run configuration.
Until it is fixed a workaround is to use gradle via the command line, as below;
gradle ProjectName:desktop run
This can also be implemented as a run configuration in IntelliJ.
I try to GWT compile my libgdx project which using libgdx utils from http://dermetfan.net/
I have very similiar question to Can't Run html libgdx with libgdx-utils
but nothing helps me...
I have done everything step by step, editing my
build.gradle
(https://bitbucket.org/dermetfan/libgdx-utils/wiki/Dependency%20Instructions)
Now it look like:
buildscript {
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
jcenter()
}
dependencies {
classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.6'
classpath 'com.android.tools.build:gradle:1.2.3'
}
}
allprojects {
apply plugin: "eclipse"
apply plugin: "idea"
version = '1.0'
ext {
appName = 'TEST'
gdxVersion = '1.6.2'
roboVMVersion = '1.3.0'
box2DLightsVersion = '1.3'
ashleyVersion = '1.4.0'
aiVersion = '1.5.0'
gdxUtilsVersion = '0.11.0'
gdxUtilssVersion = '0.13.1'
}
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
}
}
project(":core") {
apply plugin: "java"
dependencies {
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
compile "net.dermetfan.libgdx-utils:libgdx-utils:$gdxUtilssVersion"
compile "net.dermetfan.libgdx-utils:libgdx-utils-box2d:$gdxUtilssVersion"
}
}
project(":desktop") {
apply plugin: "java"
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"
}
}
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-x86"
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-x86"
}
}
project(":html") {
apply plugin: "gwt"
apply plugin: "war"
dependencies {
compile project(":core")
compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion"
compile "com.badlogicgames.gdx:gdx:$gdxVersion:sources"
compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources"
compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion:sources"
compile "com.badlogicgames.gdx:gdx-box2d-gwt:$gdxVersion:sources"
compile "net.dermetfan.libgdx-utils:libgdx-utils-box2d-gwt:$gdxUtilsVersion:sources"
}
}
tasks.eclipse.doLast {
delete ".project"
}
And Error:
Compiling module com.adacho.test.GdxDefinition
Validating units:
[ERROR] Errors in 'file:/C:/ADACHO/LibGDX%20-%20Projekty/PROJEKTY/TEST/core/src/com/adacho/test/obiekty/Ground.java'
[ERROR] Line 21: No source code is available for type net.dermetfan.gdx.graphics.g2d.Box2DSprite; did you forget to inherit a required module?
[ERROR] Errors in 'file:/C:/ADACHO/LibGDX%20-%20Projekty/PROJEKTY/TEST/core/src/com/adacho/test/obiekty/MovingPlatform.java'
[ERROR] Line 26: No source code is available for type net.dermetfan.gdx.graphics.g2d.Box2DSprite; did you forget to inherit a required module?
[ERROR] Errors in 'file:/C:/ADACHO/LibGDX%20-%20Projekty/PROJEKTY/TEST/core/src/com/adacho/test/obiekty/Postac.java'
[ERROR] Line 47: No source code is available for type net.dermetfan.gdx.graphics.g2d.AnimatedBox2DSprite; did you forget to inherit a required module?
[ERROR] Line 88: No source code is available for type net.dermetfan.gdx.graphics.g2d.AnimatedSprite; did you forget to inherit a required module?
[ERROR] Aborting compile due to errors in some input files
What surprises me is when i clear my build.gradle nothing change? WHere is problem? Please help me, i spent few days with this problem...
The GWT compiler says:
No source code is available for type net.dermetfan.gdx.graphics.g2d.AnimatedSprite
No source code is available for type net.dermetfan.gdx.graphics.g2d.Box2DSprite
AnimatedSprite resides in libgdx-utils.
Box2DSprite resides in libgdx-utils-box2d.
Apparently GWT is missing these libraries' sources so you need to add them to the HTML project's dependencies.
Your HTML project's dependencies should now look like this:
compile "net.dermetfan.libgdx-utils:libgdx-utils:$gdxUtilsVersion:sources"
compile "net.dermetfan.libgdx-utils:libgdx-utils-box2d:$gdxUtilsVersion:sources" // Box2D module (sources)
compile "net.dermetfan.libgdx-utils:libgdx-utils-box2d-gwt:$gdxUtilsVersion:sources" // Box2D module GWT specific classes (sources)
libgdx-utils-box2d-gwt only contains GWT specific classes and does not include everything from libgdx-utils-box2d. In fact I hope to remove libgdx-utils-box2d-gwt completely some time in the future.
It seems the example build script on the wiki had the same problem, sorry for that.
I downloaded the new libgdx-setup and every time I generate a project with box2dlights it fails and I can't import it because it keeps giving me an error about not finding box2dlights. I also had an issue with the older gdx-setup-ui where I couldn't access third party libraries so I am getting frustrated with libgdx.
* What went wrong:
A problem occurred configuring project ':android'.
> Could not resolve all dependencies for configuration ':android:_debugCompile'.
> Could not find com.badlogicgames.box2dlights:box2dlights:1.2.
Required by:
test:android:1.0
test:android:1.0 > test:core:1.0
When I generate a project with no dependencies checked I can import it fine into eclipse, but I want to be able to select box2dlights as I am going to be using it. I can see box2dlights in my build.gradle so from what I have gathered, it should automatically download. Here is my build.gradle
buildscript {
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9+'
}
}
allprojects {
apply plugin: "eclipse"
apply plugin: "idea"
version = '1.0'
ext {
appName = 'my-gdx-game'
gdxVersion = '1.0.0'
roboVMVersion = '0.0.11'
}
repositories {
mavenLocal()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
}
project(":desktop") {
apply plugin: "java"
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"
configurations { natives }
dependencies {
compile project(":core")
compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
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-x86"
compile "com.badlogicgames.box2dlights:box2dlights:1.1"
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-x86"
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-x86"
}
}
project(":core") {
apply plugin: "java"
dependencies {
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
compile "com.badlogicgames.box2dlights:box2dlights:1.2"
compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
}
}
tasks.eclipse.doLast {
delete ".project"
}
I can see compile "com.badlogicgames.box2dlights:box2dlights:1.1", which according to the github docs is all I need, plus I didn't change any settings so everything by default should work shouldn't it?
I believe the 1.2 is a typo.. I'm not aware of box2D lights have a version 1.2 as of yet, unless it's coming and they pre-emptively had it put in ahead of schedule to be called instead of v1.1.
For my eclipse build, I was able to compile it after changing all references of 1.2 to 1.1, and my gradle built just fine.
The setup worked even though I got those errors when using the gdx ui provided for the gradle build.
(at the very bottom of your gradle file, I noticed in the :core area, you still have a reference to boxlights 1.2, which you should change to 1.1)