question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

gdx-setup in cli mode is trying to generate project using an incompatible Gradle version and fails. It succeds in GUI mode.

See original GitHub issue

To summarize: you must include --excludeModules "ios;iosmoe" as even with excluded ios it will still want iosmoe that is needed only for ios. Quotes are necessary at least on Linux to prevent ; from terminating the command.


Please ensure you have given all the following requested information in your report.

Issue details

java -jar gdx-setup.jar --dir libgdxtest --name drop --package com.badlogic.drop --mainClass Drop --sdkLocation /home/mateusz/Android/Sdk --excludeModules ios
Executing '/home/mateusz/Downloads/libgdxtest/gradlew clean'

> Configure project :
Using already downloaded SDK: /home/mateusz/.moe/moe-sdk-1.4.0

FAILURE: Build failed with an exception.

* Where:
Build file '/home/mateusz/Downloads/libgdxtest/build.gradle' line: 84

* What went wrong:
A problem occurred evaluating root project 'libgdxtest'.
> 'void org.gradle.api.tasks.compile.CompileOptions.setBootClasspath(java.lang.String)'

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 4s

From looking at https://discuss.gradle.org/t/5-1-1-setbootclasspath-issue/30169 it seems to be caused by using an incompatible Gradle as in 5+ setBootClasspath is gone

Curiously, I run gdx setup jar in GUI mode previously and I hit much more smaller bug (#5916)

I now rerun it in the GUI mode

screen03

and at least general generation worked. I suspect that somehow parameters are different but I am missing what is changed.

GUI generated repo is at https://github.com/matkoniecz/libgdx-fuller-crash-without-crash-because-GUI

Reproduction steps/code

java -jar gdx-setup.jar --dir libgdxtest --name drop --package com.badlogic.drop --mainClass Drop --sdkLocation /home/mateusz/Android/Sdk --excludeModules ios

https://github.com/matkoniecz/libgdx-fuller-crash

Version of LibGDX and/or relevant dependencies

https://github.com/libgdx/libgdx/wiki/Project-Setup-Gradle appears to generate projects with LibGDX 1.9.10 (gdxVersion = '1.9.10')

Stacktrace

https://gist.github.com/matkoniecz/40b05052d72b970dc01a161f140bece7

Please select the affected platforms

  • Android
  • iOS (robovm)
  • iOS (MOE)
  • HTML/GWT
  • Windows
  • Linux
  • MacOS

More platform info

mateusz@grisznak:~/Downloads/libgdx_test$ uname -a
Linux grisznak 5.3.0-40-generic #32-Ubuntu SMP Fri Jan 31 20:24:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
mateusz@grisznak:~/Downloads/libgdx_test$ java --version
openjdk 11.0.6 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu119.10.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu119.10.1, mixed mode, sharing)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
tommyettingercommented, Feb 29, 2020

This is a legitimate bug in gdx-setup, but it’s easy enough to work around. You exclude ios already from the generated project, but for some reason MOE (an outdated alternative to the working ios platform) is still enabled by default for command line builds only. It’s enabled, but as you have seen, it’s broken. Can you try this, maybe? You may need to change the dir to an empty one.

java -jar gdx-setup.jar --dir libgdxtest --name drop --package com.badlogic.drop --mainClass Drop --sdkLocation /home/mateusz/Android/Sdk --excludeModules ios;iosmoe

All I added was ;iosmoe at the end.

1reaction
Tom-Skicommented, Mar 21, 2020

Yes we should probably just remove moe at this point. But if people are still somehow using it, then there hsould be an option to target it. @shatterblast you are using moe? If so, how? With what versions? Last time I checked support was completely dropped and this was no longer functioning with latest ios and IDEs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrading your build from Gradle 6.x to the latest
Run gradle wrapper --gradle-version 7.0 to update the project to 7.0. Try to run the project and debug any errors using the Troubleshooting...
Read more >
Deprecated Gradle features were used in this build, making it ...
Run the Gradle build with a command line argument --warning-mode=all to see what exactly the deprecated features are.
Read more >
Gradle for Android - Unity - Manual
A standard Android Gradle project file that configures the environment of the build system. Unity specifies the path to SDK and NDK here...
Read more >
Maven and Gradle support for Java in Visual Studio Code
The extension also enables you to generate effective POM. You can also use the command Maven: Add a Dependency (or maven.project.addDependency ) to...
Read more >
Gradle build failed - Unity Forum
stderr[ FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring root project 'gradleOut'. >
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found