Android build failure ERROR 256

Hi solar2d community.

I am getting this error when i try to build my project for android API 31:

FAILURE: Build failed with an exception.
                    
                    * What went wrong:
                    Could not resolve all files for configuration 'classpath'.
                    > Could not find klaxon-5.0.1.jar (com.beust:klaxon:5.0.1).
                      Searched in the following locations:
                          https://jcenter.bintray.com/com/beust/klaxon/5.0.1/klaxon-5.0.1.jar
                    
                    * 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
                    
                    Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

My gradle version is 8.9. I read in some forum and they said this: You need to update the build.gradle file to use an alternative Maven repository. As of February 1, 2021, JCenter has been sunset, and many dependencies are being moved to other repositories like mavenCentral. Make sure your build.gradle file is configured to look in mavenCentral. However, Since I am compiling from Solar2D and not natively, I don’t see how to make the change.

Solar2d version: 2024.3707

Do you have any idea about how to solve this issue. Thanks.

Hi,

Thanks vincenthawk it solved the error for API 31. Hoping issue for API 34 would be solved soon.

1 Like

Interesting. I did the same check-marks as @vincenthawk suggested in his screen shot. But I still get the error.
As it is recommended in an other thread regarding version 3707, I uninstalled that version. Using now 3706, which definitivly worked in the past. But event that build is now stopping with an error.

I think it is really related to still using JCenter instead of mavenCentral.

FAILURE: Build failed with an exception.
                    
                    * What went wrong:
                    Could not resolve all files for configuration 'classpath'.
                    > Could not find com.beust:klaxon:5.0.1.
                      Searched in the following locations:
                        - https://dl.google.com/dl/android/maven2/com/beust/klaxon/5.0.1/klaxon-5.0.1.pom
                        - https://jcenter.bintray.com/com/beust/klaxon/5.0.1/klaxon-5.0.1.pom
                      Required by:
                          unspecified:unspecified:unspecified
                    
                    * 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 6s

@vlads Please provide a quick fix or an hint how to enabled building for Android again.

1 Like

As of today, the build 3706 is working again. So I was wrong with my assumptions and it seems to be related to a temporary problem accessing the maven repositories. Apologies.

I can confirm 3706 is working, too, but the new 3707 is definitely resulting in Build Failure Error 256 on Android. @vlads and @Scott_Harrison - can you provide us with more details about what was changed in-between 3706 and 3707?

We changed runner which performed a build from x86 to arm64, alongside with default version of Java. This together cause issue which was hard to debug because tho things changed in one place and both had to be fixed in order for the build to start working again.
Btw. New build is up. It has Android 34 target as well. Make sure to report any issues encountered

4 Likes

I downloaded Solar 3708 today and did my first build since April (when using Solar 3706) and it bombed out with:

08:59:16.516  FAILURE: Build failed with an exception.
08:59:16.516  
08:59:16.516  * What went wrong:
08:59:16.516  Could not resolve all artifacts for configuration 'classpath'.
08:59:16.516  > Could not find com.beust:klaxon:5.0.1.
08:59:16.516    Searched in the following locations:
08:59:16.516      - https://dl.google.com/dl/android/maven2/com/beust/klaxon/5.0.1/klaxon-5.0.1.pom
08:59:16.516      - https://jcenter.bintray.com/com/beust/klaxon/5.0.1/klaxon-5.0.1.pom
08:59:16.516    Required by:
08:59:16.516        unspecified:unspecified:unspecified
08:59:16.516

Not touched anything on the system since April

1 Like

Please try temporary solution Android 14 (API Level 34) - #61 by clang

getting an error buiding solar2d ver .3708

10:49:56.507 The timestamp will expire on 2031-11-09.
10:50:03.738 Picked up JAVA_TOOL_OPTIONS: -Duser.language=en
10:50:03.738
10:50:03.738 FAILURE: Build failed with an exception.
10:50:03.738
10:50:03.738 * What went wrong:
10:50:03.738 Could not resolve all artifacts for configuration ‘classpath’.
10:50:03.738 > Could not find com.beust:klaxon:5.0.1.
10:50:03.738 Searched in the following locations:
10:50:03.738 - https://dl.google.com/dl/android/maven2/com/beust/klaxon/5.0.1/klaxon-5.0.1.pom
10:50:03.738 - https://jcenter.bintray.com/com/beust/klaxon/5.0.1/klaxon-5.0.1.pom
10:50:03.738 Required by:
10:50:03.738 unspecified:unspecified:unspecified
10:50:03.738
10:50:03.738 * Try:
10:50:03.738 > Run with --stacktrace option to get the stack trace.
10:50:03.738 > Run with --info or --debug option to get more log output.
10:50:03.738 > Run with --scan to get full insights.
10:50:03.738 > Get more help at https://help.gradle.org.
10:50:03.738

does anyone have a concrete resolution for this issue ?
need to compile for API 34 in google play

Thanks guys

I followed @clang’s resolution.
and it works perfectly, i was able to compile for API 34.
submitted to google play. and the warning went away.

Thanks all!

Which OS are you building on? (Windows or Mac?)
There have been reports of builds with no problems and builds that get a 256, and I’m wondering if it’s a PC issue, a plugin issue or what.

@clang Thank you for your response, it built successfully.
@colinmorgan Thanks for asking, I’m on Windows.

1 Like

I have the same issue after installing 2024.3708, and the same problem if I go back and try 2024.3706. All worked fine last week, no other changes.

Using openjdk version “17.0.6” 2023-01-17
OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
OpenJDK 64-Bit Server VM (build 17.0.6+0-17.0.6b829.9-10027231, mixed mode)
BUILD SUCCESSFUL
Total time: 1 second
FAILURE: Build failed with an exception.

                * What went wrong:
                Could not resolve all artifacts for configuration 'classpath'.
                > Could not find com.beust:klaxon:5.0.1.

I’ll try the gradle patch.

The gradle patch worked. Thank you.

3709 has been released and the issue has been fixed.

@Kan98 This issue may be fixed, but…same error but different circumstances here: Android Build Error 256 in 3707, 3708 and 3709