It's kind of sad that gdx-setup is still using Gradle 2.10 by default. Espeically the libGDX itself is built with Gradle 3.1, which means one has to use two different major versions of Gradle if he works from source. Shouldn't the generated project use the same version as libGDX does?
Gradle 3.5 just released with some good features. I'll suggest upgrading both libGDX and gdx-setup project to 3.5. I actually upgraded the Gradle wrapper of my project to Gradle 3.5 and it worked on desktop, but I haven't tested it on android/ios/gwt.
After further testing, I found this upgrade broke my IDEA scopes because Gradle changed how scope mapping works.
To fix this one has to add this in build.gradle
:
subprojects {
if(it.name != "android") { // android plugin is not compatible with java plugin
apply plugin: "java"
apply plugin: "idea"
idea {
module {
scopes.PROVIDED.minus += [configurations.compile]
scopes.COMPILE.plus += [configurations.compile]
}
}
}
}
which makes them back to COMPILE
scope again. Just a small heads-up for anyone who wants to upgrade his Gradle.
Also I tested upgraded Gradle on Android and it worked for me.
Damn, looks like they broke integration quite well. Its fixed in 2017.1, but not for us as we have an android project. Your workaround should be good, and it's not too nasty. Command line we are still good, just need to test AS, eclipse and netbeans also.
Interestingly the idea gradle plugin makes a 'fixed' project, but the dependencies there are pretty whack too.
I have successfully upgraded my libgdx project to gradle 3.5, but be aware of this issue : https://issuetracker.google.com/issues/37137480
I finally landed on gradle plugin 2.2.3 although Android Studio keeps asking you to upgrade more...
Sorry for self-bumping, but is there any plan on this?
And upcoming gradle 4.0 looks even more interesting https://blog.gradle.org/blazing-fast-android-builds
Yes, I'm currently updating to 4.0.1 in the core repository, which should be done in a few days, and when tested will release the changes into the setup. Need to work on a better solution for Intellij though if possible. Unfortunately it is still not fixed for our projects, probably due to the mixture of android and java projects, I'll try find something we can do, and worst case scenario we can use the workaround.
Hello,
After upgrading to Android Studio 3.0 and Gradle 4.0.0 I have this problem. I've deleted my gradle folders in projets and user folder, but the error is always here, forbidding me to build a desktop project.
Everything was working fine before. :(
Any clue please?
"C:\Program Files\Android\Android Studio\jre\bin\java" "-javaagent:C:\Program Files\Android\Android Studio\lib\idea_rt.jar=50217:C:\Program Files\Android\Android Studio\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Android\Android Studio\jre\jre\lib\charsets.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\cldrdata.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\dnsns.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\jaccess.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\extlocaledata.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\nashorn.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\sunec.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\sunmscapi.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\zipfs.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\jce.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\jsse.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\management-agent.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\resources.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\rt.jar;D:\Git\LapisLazuli\desktop\build\classes\java\main;D:\Git\LapisLazuli\core\build\classes\java\main;D:\Git\LapisLazuli\core\build\libs\core-0.4a.jar;D:\Git\LapisLazuli\desktop\build\libs\desktop-0.4a.jar" com.lapislazuli.desktop.DesktopLauncher
java.lang.NoClassDefFoundError: com/badlogic/gdx/ApplicationListener
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: com.badlogic.gdx.ApplicationListener
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main"
Process finished with exit code 1
Please update the GDX-Setup Programm since Android studio 3.0 is on the release Chanel and suggest every Project to update to Gradel 4.0 and android.gradle 3.0 we must keep up with that or all Projects even new ones crashing on the start.
This is still broken on IDEA's side, which creeps into AS due to them building from it. Updating Gradle to 3.5+ will force break applications in both IDEA and AS, so it is not a solution. This is due to be fixed this autumn with the release of IDEA 2017.3. I'd rather wait to find the result before hacking up a solution that will have to be reverted (which would also break applications).
due to
https://youtrack.jetbrains.com/issue/IDEA-122904
https://youtrack.jetbrains.com/issue/IDEA-170058
https://youtrack.jetbrains.com/issue/IDEA-171804
wow wasn't expectign such a thing from jetbrains, they are usualy very quick to fix stuff. Don't their users work with the latest gradle?
But regardless, some of us work with eclipse/console gradle, why should we be kept back? But then there's no point hacking on this as you said. that's life.
They do, and the integration is great on newer Gradle, just not with this specific multi project project where you mix java (non library) and android builds all managed by Gradle.
You are free to update yourself, you can simply update the wrapper version in gradle/gradle-wrapper.properties and change . See https://github.com/libgdx/libgdx/commit/739ce6985c97343b294d48792a3883c37a62fc19#diff-8ed1a771bc236c287ad93c699bfdd2d7 for details on specific fixes you may need, for things like gwt.
Its just not suitable for the setup tool because it doesn't cover all bases and breaks more than it fixes.
I have been doing so,with mixed results. Of course I won't bring them in here, since that was me rushing ahead of myself and this commnity.
If this is an issue with Idea/AS, presumably that means that it'll be a while before we see a fix for this since it will require not only a newer version of libGDX, but also a newer version of Idea and then a new version of AS which includes the fix from Idea?
This is due to be fixed in 2017.3 as their issue tracker states, and 2017.3 is due to be released in Autumn of 2017. As soon as this happens we can upgrade. As for AS, they will have to patch it, yes.
I use AS for some "pure" Android development, so there will be no way to avoid updating it to version 3.0.
What are the downsides to using IntelliJ instead of AS with a libGDX project?
There aren't really many. You will just not have some of the AS specific features google have added. Most of which you probably wouldn't be using with LibGDX anyway.
@raincole thank you very much.
hi guys !
I'm new in android AND game dev... so sometime I'm lost. but having old tools....
so here is my (noby) feedback on upgrading gradle on AS with libGDX:
First I've updated gradle to 4.1 from AS -> worked like a charm !
And after I've upgrade plugin from 2.3.3 to 3.0.1 in the project build.gradle
: got some errors but AS asked about adding maven repo, I said why not (what is maven repo ???) and voilà !
(I had the HTML support removed before)
I did some command line tests
22:32 $ ./gradlew --version
------------------------------------------------------------
Gradle 4.1
------------------------------------------------------------
Build time: 2017-08-07 14:38:48 UTC
Revision: 941559e020f6c357ebb08d5c67acdb858a3defc2
Groovy: 2.4.11
Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM: 1.8.0_151 (Oracle Corporation 25.151-b12)
OS: Linux 4.13.15-200.fc26.x86_64 amd64
clean rebuid/install
./gradlew clean
./gradlew android:installDebug
all went smoothly (had to handle JAVA_HOME
)
@quazardous It builds without, but running a desktop application is what is broken see my comment on #4855 on how to launch desktop applications.
IDEA 2017.3 released, waiting for the upgrade libgdx 👍
@adam4813 ok :/ sorry I focused on android only I'll try IDEA instead of AS (cause GAFA are bad ;p)
@quazardous nothing wrong with what you said, I just wanted you to be aware of that caveat.
@ProZhar this is still not fixed in the release.
Is the necessary AS/Idea fix included in AS 3.0.1?
@phunni I found a work around that makes it work for now if you aren't going for a GWT target.
@adam4813 I'm not going for GWT - is it the same one listed above? I'm currently experimenting with Kotlin and the one above doesn't work with Kotlin projects...
Ok that was much more painful than it needed to be. Turns out you can just tell Android Studio to run a JAR application
and execute gradle :desktop:dist
before hand.
For this approach set Path to JAR
to PROJECT_ROOT\desktop\build\libs\desktop-1.0.jar
and Working Directory
that same as you would for running an application. Lastly in the Before launch
at the bottom I added a gradle task with project YOUR_GAME:desktop
and task desktop:dist
.
The task part is the important part. Make sure you call desktop:dist
and not just dist
or it will build all modules.
thanks - I'll give that a go
Sorry to be dense - when you say "Path to JAR" do you mean set $PATH or something else?
No in the run configuration there is an entry for path to jar. I'll post a
screenshot later if needed.
On Dec 18, 2017 12:25 PM, "Paul Hunnisett" notifications@github.com wrote:
Sorry to be dense - when you say "Path to JAR" do you mean set $PATH or
something else?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/libgdx/libgdx/issues/4698#issuecomment-352515382, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AC31TUxx2bG6WVSRYZxoaZqZf5ruML96ks5tBq4agaJpZM4M-TI-
.
Interesting - I had assumed that's what you meant, but I can't see any such entry... Am I being blind?
You need to run it as a JAR application not a Kotlin or Desktop application. Click the green + in the upper-left corner and choose JAR application.
Well - it turns out that really was more painful than it needed to be! FYI - it doesn't work for projects that have a Kotlin class for the Desktop Launcher
Ah good to know I suppose.
On Dec 19, 2017 1:44 PM, "Paul Hunnisett" notifications@github.com wrote:
Well - it turns out that really was more painful than it needed to be! FYI
- it doesn't work for projects that have a Kotlin class for the Desktop
Launcher—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/libgdx/libgdx/issues/4698#issuecomment-352865654, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AC31TZDC_AKbTcihPxvuogiJNqQ5tUGyks5tCBIigaJpZM4M-TI-
.
It's been very painful, but I've finally managed to get my LibGDX project working on both Desktop and Android (Oreo-compatible, I think) in Android Studio 3 with:
JDK 7
LibGDX 1.9.9-SNAPSHOT (latest)
Gradle 4.4 (latest)
Android Gradle plugin 3.0.1 (latest)
Android SDK 27 (latest)
buildToolsVersion '27.0.3' (latest)
compileSdkVersion 27 (latest)
Feels like I tried everything, and this is the only combination I've got to work.
For the Desktop project I needed to follow the procedure outlined above by @adam4813 (thanks lol).
Maybe IDEA will finally get their shit together in 2018.1. But I needed something for now, looks like I finally stumbled across it.
Thanks to everyone who's made LibGDX great.
Would very much appreciate a short guide to running gradle 4.5 with LibGDX (1.9.8 or later, realistically) as what currently is on this thread is quite confusing. But from what I currently understand, there is the jetty plugin issue for html, and another issue with android (I don't do android development, but many do, so I'm sure a clear explanation for those who do would be great).
@Ktar5 as far as desktop only
You need to run it as a JAR application not a Kotlin or Desktop application. Click the green + in the upper-left corner and choose JAR application.
@adam4813 I ended up getting it working on HTML and Desktop-- with desktop, i just Right Click -> Run (Regular Application) but as you say it also works as JAR application. With HTML I can provide a build.gradle if anyone is interested in using it, however GWT obviously still can't use certain classes like UUID so that becomes a huge pain so I ended up removing HTML support from my game.
@mellotech I can verify that your solution works, thanks! I did not need to do anything else aside from setting the proper versions. Android 3.0+ is incompatible with Intellij 2017.2, so I had to downgrade it to 2.3.0.
This is my setup, which allows me to run everything:
JDK 8
LibGDX 1.9.9-SNAPSHOT
Gradle 4.5
Android Gradle plugin 2.3.0
Android SDK 27
buildToolsVersion '27.0.3'
compileSdkVersion 27
You may need to disable the jetty plugin from the html gradle.build. You could use Gretty instead: https://stackoverflow.com/questions/47013825/use-gretty-plugin-instead-of-jetty-for-gradle-4-2-1
@AlexanderTang Java 8 won't work with Gradle plugin 2.3.0 as far as I can tell. Are you using Jack?
This is my current configuration, working fine so far:
IntelliJ Idea 2008.1
JDK 8
sourceCompatibility 1.8
LibGDX 1.9.9-SNAPSHOT
Gradle 4.5
Android Gradle plugin 3.0.1
Android SDK 27
buildToolsVersion 27.0.3
compileSdkVersion 27
Do the latest versions of AS/Idea fix or help with this?
No, this is what is breaking mostly. On command line you are fine, but IDE integration is broken with AS and IDEA.
Google doesn't really seem to care that the Android plugin for IntelliJ was so much behind. I switched to Android Studio 3.0.1 when it came out, and now they finally merged "Android Studio 3.0" changes into intelliJ 2018.1 my Android Studio 3.0.1 project is not backwards compatible with IntelliJ 2018.1. I gues I'm sticking with Android Studio as I don't have a desktop version right now.
Edit: Oh just noticed there is even an Android Studio 3.1 already.
Edit2: Aaaaaaand I'm in combat to get it to work again.
Got working libgdx project with gradle wrapper 4.4 and gradle plugin 3.1.1. Works android, desktop and robovm, Java 8 lambdas works too.
Configuration is:
Android Studio 3.1.1
LibGDX 1.9.8
JDK 8
sourceCompatibility 1.8
All what i had to do is need to move android project description in root build.gradle to android/build.gradle and little fixes for issues, which was printed by gradle into console.
@ak47ex: what exactly did you change in the gradle files to make it work?
i also moved the android project description, after cleaning and rebuilding the project, but got the same issues when tried to run the desktop part !
A brief update on my experience on this:
After a while using the configuration described in my previous comment, I ought to say that I have found some issues with Gradle an IntelliJ Idea.
Idea seems to lost track of some Android libraries quite often, and I get a lot of "symbol not found" errors for these on the IDE. However, it builds fine with Gradle. A typical workaround is to invalidate the index cache and restart the IDE. It works most of the time BUT still, a couple of times I've found no solution but to remove the .idea directory altogether and re-import the Gradle project. It's a pain in the ass, because you'll lost all the project's IDE configuration, including run configurations.
Idea seems unable to detect changes on tests and rebuild these by itself. Every time I make changes on JUnit test classes, I must compile these with Gradle first to be able to run them from an Idea task. You can also run the tests directly from Gradle, but these come without coverage information and doing it this way you cannot use the IDE debugger if you need to do so. Thus, the best workaround is to run Gradle's build/testClasses first and then you can run them from the IDE.
There are other minor issues there, like some warnings about deprecated tasks in Gradle, but these do not interfere with the build process.
So, to sum it up, as of 2008.1 version IntelliJ Idea integration with Gradle 4.5 seems to be broken but still, there are some workarounds for these issues.
Ah, yeah, and for the Java 8 functional programming (and other) features it's great to be able to use these in test classes and in modules that are not dependencies for the android one, but I cannot use them in android and core modules due the android's minSDK level I'm using right now. For that to work, you need to address a minSDK of 24 or so, I think, and that leaves out too many devices so it's not an option. Nonetheless, this is an Android issue, nothing directly related to Gradle and Idea, and it has no other solution than increasing the minSDK but, in my case at least, it isn't worth for it.
I hope this information is useful for someone else.
Bests!
@yarnee i cut everything inside "project(":android")" scope in main build.gradle and paste it in the root of android.gradle file. Also added line "apply plugin: "com.android.application". Gradle warned me about deprecated things like using "compile" word and flavors without dimension. I fixed it. That's all.
Actually this isn't even needed, for desktop applications, with Gradle wrapper 4.4 and build tools 3.1.1. I simple had to change the Before Launch to Build Project
instead of Build
when using an Application
configuration.
To do this, in the Before launch box at the bottom of the Run/Debug Configuration dialog, for an Application
configuration, click the green + and add Build Project
and then select the Build
line and click the red - to remove it.
Done and fixed without any hassle!
For completeness I am using Android Studio 3.1.1 .
We have some fixes in newer versions of Gradle that will now us to upgrade without any silly hacks. Will be updating libgdx and generated projects to be compatible shortly!
@Tom-Ski Please setup the asset Folder in the root folder instead of the android module this will give more consistency.
Ist a good time to do this while we setup the gradle system anyway.
Any idea about this NPE?
AS 3.01 => The update to 3.11 fails.
Gradle 4.6.
Impossible to build my project since the upgrade. :/
Found nothing on the net (removing gradle cache folder, invalidate caches/restart on AS... tried several confs in gradle...). I think i'm done for a complete clean download+install again of AS 3.11....
Logs of : gradlew core:assemble --stacktrace
Configuration on demand is an incubating feature.
Configure project :
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to C:\Users\Dam\AppData\Local\Android\Sdk\nd
k-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
FAILURE: Build failed with an exception.
What went wrong:
java.lang.NullPointerException (no error message)
Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Exception is:
java.lang.NullPointerException
at com.android.build.gradle.BasePlugin.lambda$configureProject$1(BasePlugin.java:436)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:42)
at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:230)
at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:149)
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:58)
at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:324)
at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:234)
at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:140)
at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:37)
at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy68.graphPopulated(Unknown Source)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:128)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:46)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
at org.gradle.initialization.DefaultGradleLauncher$ExecuteTasks.run(DefaultGradleLauncher.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.ja
va:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.ja
va:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.initialization.DefaultGradleLauncher.runTasks(DefaultGradleLauncher.java:210)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:140)
at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:115)
at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:78)
at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:75)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:152)
at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:100)
at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:75)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$1.run(RunAsBuildOperationBuildActionRunner.java:43)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.ja
va:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.ja
va:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:40)
at org.gradle.tooling.internal.provider.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:51)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:49)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:32)
at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:39)
at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:25)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:80)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:53)
at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:57)
at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:32)
at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36)
at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25)
at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExec
uter.java:43)
at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExec
uter.java:29)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:64)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:29)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:59
)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:44
)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:45)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:30)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
at org.gradle.util.Swapper.swap(Swapper.java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:62)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:82)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:295)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Get more help at https://help.gradle.org
BUILD FAILED in 1s
Please visit https://github.com/libgdx/libgdx/issues/5177 to keep track on current upgrade status.
My project is running on Android and Windows now, thank you for the tips! It's possible to use Java 8 features in Android too (lambdas for example).
https://github.com/viniciuspjardim/color-beans/commit/6deae6052ee72d50d7186c63fa52730bb0e253e5
I did the following tip by @adam4813 (thanks)
I changed the
Before Launch
toBuild Project
instead ofBuild
when using anApplication
configuration.To do this, in the
Before launch
box at the bottom of theRun/Debug
Configuration dialog, for an Application configuration, click the green+
and addBuild Project
and then select theBuild
line and click the red-
to remove it.
Also I changed in the file gradle.properties
the property org.gradle.configureondemand
to false
.
Morning all
I have a LibGDX project for iOS (MOE), Android and Desktop. I have just discovered that Desktop is not longer running. IT IS in KOTLIN!
I did try to upgrade to gradle 4.4, build 3.1.1 and latest AS but then non of the projects would compile with weird error like Program type already present: com.badlogic.gdx.sql.Database. I even took out all refs to this
So now I am running
Gradle 4.1
Build tools 2.3.3
All I want to fix is getting the desktop app working (iOS/ Android work If I run the normal Desktop Launcher I get
Error: Could not find or load main class com.burfdevelopment.hack24.desktop.DesktopLauncher
If I do the .jar workaround, I get
no main manifest attribute, in /Users/snrb/Documents/Hack24-Cross/Hack24/desktop/build/libs/desktop-1.0.jar
Most helpful comment
After further testing, I found this upgrade broke my IDEA scopes because Gradle changed how scope mapping works.
To fix this one has to add this in
build.gradle
:which makes them back to
COMPILE
scope again. Just a small heads-up for anyone who wants to upgrade his Gradle.Also I tested upgraded Gradle on Android and it worked for me.