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.

Build with Gradle 5.4.1 fails

See original GitHub issue

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

Issue details

> Configure project :tests:gdx-tests-android
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation'.
It will be removed at the end of 2018

> Task :extensions:gdx-jnigen:compileJava FAILED
error: Source option 6 is no longer supported. Use 7 or later.
error: Target option 6 is no longer supported. Use 7 or later.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':extensions:gdx-jnigen:compileJava'.
> Compilation failed; see the compiler error output for details.

Reproduction steps/code

Downloaded https://github.com/libgdx/libgdx/archive/gdx-parent-1.9.10.tar.gz Extract to folder, run Gradle Build from command line Gradle is local installation (version 5.4.1) JDK is Open jdk-12.0.1 (Oracle)

Version of LibGDX and/or relevant dependencies

1.9.10

Stacktrace

None, Compile fails

Please select the affected platforms

None, Compile fails

Additional notes, Changed all sourceCompatibility and targetCompatibility in all gradle files from 1.6 and 1.7 to 1.8 Most of compile goes through but it fails again with following error

> Task :extensions:gdx-bullet:compileJava FAILED
P:\libgdx-gdx-parent-1.9.10\extensions\gdx-bullet\jni\swig-src\collision\com\badlogic\gdx\physics\bullet\collision\Collision.java:148: error: cannot find symbol
  public static void setGContactAddedCallback(SWIGTYPE_p_f_r_btManifoldPoint_p_q_const__btCollisionObjectWrapper_int_int_p_q_const__btCollisionObjectWrapper_int_int__bool value) {
                                              ^
  symbol:   class SWIGTYPE_p_f_r_btManifoldPoint_p_q_const__btCollisionObjectWrapper_int_int_p_q_const__btCollisionObjectWrapper_int_int__bool
  location: class Collision
P:\libgdx-gdx-parent-1.9.10\extensions\gdx-bullet\jni\swig-src\collision\com\badlogic\gdx\physics\bullet\collision\Collision.java:152: error: cannot find symbol
  public static SWIGTYPE_p_f_r_btManifoldPoint_p_q_const__btCollisionObjectWrapper_int_int_p_q_const__btCollisionObjectWrapper_int_int__bool getGContactAddedCallback() {
                ^
  symbol:   class SWIGTYPE_p_f_r_btManifoldPoint_p_q_const__btCollisionObjectWrapper_int_int_p_q_const__btCollisionObjectWrapper_int_int__bool
  location: class Collision
P:\libgdx-gdx-parent-1.9.10\extensions\gdx-bullet\jni\swig-src\dynamics\com\badlogic\gdx\physics\bullet\dynamics\btSimulationIslandManagerMt.java:235: error: cannot find symbol
  public SWIGTYPE_p_f_p_btAlignedObjectArray__p_btSimulationIslandManagerMt__Island___p_btSimulationIslandManagerMt__IslandCallback__void getIslandDispatchFunction() {
         ^
  symbol:   class SWIGTYPE_p_f_p_btAlignedObjectArray__p_btSimulationIslandManagerMt__Island___p_btSimulationIslandManagerMt__IslandCallback__void
  location: class btSimulationIslandManagerMt
P:\libgdx-gdx-parent-1.9.10\extensions\gdx-bullet\jni\swig-src\dynamics\com\badlogic\gdx\physics\bullet\dynamics\btSimulationIslandManagerMt.java:240: error: cannot find symbol
  public void setIslandDispatchFunction(SWIGTYPE_p_f_p_btAlignedObjectArray__p_btSimulationIslandManagerMt__Island___p_btSimulationIslandManagerMt__IslandCallback__void func) {
                                        ^
  symbol:   class SWIGTYPE_p_f_p_btAlignedObjectArray__p_btSimulationIslandManagerMt__Island___p_btSimulationIslandManagerMt__IslandCallback__void
  location: class btSimulationIslandManagerMt
P:\libgdx-gdx-parent-1.9.10\extensions\gdx-bullet\jni\swig-src\collision\com\badlogic\gdx\physics\bullet\collision\Collision.java:149: error: cannot find symbol
    CollisionJNI.gContactAddedCallback_set(SWIGTYPE_p_f_r_btManifoldPoint_p_q_const__btCollisionObjectWrapper_int_int_p_q_const__btCollisionObjectWrapper_int_int__bool.getCPtr(value));
                                           ^
  symbol:   variable SWIGTYPE_p_f_r_btManifoldPoint_p_q_const__btCollisionObjectWrapper_int_int_p_q_const__btCollisionObjectWrapper_int_int__bool
  location: class Collision
P:\libgdx-gdx-parent-1.9.10\extensions\gdx-bullet\jni\swig-src\collision\com\badlogic\gdx\physics\bullet\collision\Collision.java:154: error: cannot find symbol
    return (cPtr == 0) ? null : new SWIGTYPE_p_f_r_btManifoldPoint_p_q_const__btCollisionObjectWrapper_int_int_p_q_const__btCollisionObjectWrapper_int_int__bool(cPtr, false);
                                    ^
  symbol:   class SWIGTYPE_p_f_r_btManifoldPoint_p_q_const__btCollisionObjectWrapper_int_int_p_q_const__btCollisionObjectWrapper_int_int__bool
  location: class Collision
P:\libgdx-gdx-parent-1.9.10\extensions\gdx-bullet\jni\swig-src\dynamics\com\badlogic\gdx\physics\bullet\dynamics\btSimulationIslandManagerMt.java:237: error: cannot find symbol
    return (cPtr == 0) ? null : new SWIGTYPE_p_f_p_btAlignedObjectArray__p_btSimulationIslandManagerMt__Island___p_btSimulationIslandManagerMt__IslandCallback__void(cPtr, false);
                                    ^
  symbol:   class SWIGTYPE_p_f_p_btAlignedObjectArray__p_btSimulationIslandManagerMt__Island___p_btSimulationIslandManagerMt__IslandCallback__void
  location: class btSimulationIslandManagerMt
P:\libgdx-gdx-parent-1.9.10\extensions\gdx-bullet\jni\swig-src\dynamics\com\badlogic\gdx\physics\bullet\dynamics\btSimulationIslandManagerMt.java:241: error: cannot find symbol
    DynamicsJNI.btSimulationIslandManagerMt_setIslandDispatchFunction(swigCPtr, this, SWIGTYPE_p_f_p_btAlignedObjectArray__p_btSimulationIslandManagerMt__Island___p_btSimulationIslandManagerMt__IslandCallback__void.getCPtr(func));
                                                                                      ^
  symbol:   variable SWIGTYPE_p_f_p_btAlignedObjectArray__p_btSimulationIslandManagerMt__Island___p_btSimulationIslandManagerMt__IslandCallback__void
  location: class btSimulationIslandManagerMt
Note: P:\libgdx-gdx-parent-1.9.10\extensions\gdx-bullet\src\com\badlogic\gdx\physics\bullet\BulletBase.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
8 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':extensions:gdx-bullet:compileJava'.
> Compilation failed; see the compiler error output for details.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
SimonITcommented, Sep 2, 2019

I recommend you to use java 11. With java 11 you don’t have to increase the sourceCompatibility and targetCompatibility

0reactions
SimonITcommented, Mar 25, 2020

Tom-Ski changed the sourceCompatibility and targetCompatibility in https://github.com/libgdx/libgdx/commit/de77fee09ca14d0b2a02672ba93fa6871f1b7e05, so it might work now without changing the jdk

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting builds - Gradle User Manual
If gradle --version works, but all of your builds fail with the same error, it is possible there is a problem with one...
Read more >
Build Gradle Failed - java - Stack Overflow
... "BUILD FAILED" with "Could not target platform: 'Java SE 11' using tool chain: 'JDK 8 (1.8)'" I'm using java jre 1.8 and...
Read more >
Fix Error: Could not install Gradle distribution from ... - YouTube
How to fix error : Could not install Gradle distribution from 'https://services. gradle.org/distributions/ gradle -7.0.2-bin.zip' in Android ...
Read more >
Android Gradle plugin release notes - Android Developers
However this might fail in some cases, for example if you've just updated AGP and it's no longer compliant with the current Gradle...
Read more >
Android gradle build fails after updating to 3.6.0
Android gradle build fails after updating to 3.6.0.. ACAlex Cheng ... distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip to ...
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