简体   繁体   中英

Fail to run desktop app with desktop:run LIBGDX

I am using android studio idea for my libgdx project. I configured custom desktop configuration setting

Tasks: desktop:run
Gradle Project: mygame

Running android works fine but running this configuration brings the following error

9:08:42 PM: Executing task 'desktop:run'...

Executing tasks: [desktop:run]

Configuration on demand is an incubating feature. WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation'. It will be removed at the end of 2018 Gradle now uses separate output directories for each JVM language, but this build assumes a single directory for all classes from a source set. This behaviour has been deprecated and is scheduled to be removed in Gradle 5.0 at build_4irp102idy0ifcnkhwn53osnp$_run_closure3.doCall(D:\\LibgdxProjects\\Tembo\\desktop\\build.gradle:22) (Run with --stacktrace to get the full stack trace of this deprecation warning.)

FAILURE: Build failed with an exception.

  • What went wrong: java.lang.NullPointerException (no error message)

  • 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 2s 9:08:45 PM: Task execution finished 'desktop:run'.

Important details

Gradle version: 4.4

How can i fix this. I tried downgrading my gradle version but the minimim supported is 4.4

NOTE: running gradlew desktop:run on project root works.

当前不支持此版本的gradle,可以使用版本2.3.3。有一个活动可以升级到Gradle 4.6,您可以在这里进行后续https://github.com/libgdx/libgdx/issues/5177

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM