# Android build failure ERROR 256

**URL:** <https://forums.solar2d.com/t/android-build-failure-error-256/356699>\
**Category:** Daily Builds and Public Releases\
**Created:** [August 5, 2024, 6:45pm UTC](https://forums.solar2d.com/t/android-build-failure-error-256/356699 "2024-08-05T18:45:41Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![andavidos](https://forums.solar2d.com/user_avatar/forums.solar2d.com/andavidos/32/4040_2.png) [@andavidos](https://forums.solar2d.com/u/andavidos)\
**Post date:** [August 5, 2024, 6:45pm UTC](https://forums.solar2d.com/t/android-build-failure-error-256/356699/1 "2024-08-05T18:45:41Z")

</div>

Hi solar2d community.

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

```auto
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.

---

<div class="post-metadata">

**Author:** ![vincenthawk](https://forums.solar2d.com/user_avatar/forums.solar2d.com/vincenthawk/32/3945_2.png) [@vincenthawk](https://forums.solar2d.com/u/vincenthawk)\
**Post date:** [August 6, 2024, 5:04pm UTC](https://forums.solar2d.com/t/android-build-failure-error-256/356699/2 "2024-08-06T17:04:23Z")

</div>

> [@Android build failed (256)](https://forums.solar2d.com/t/android-build-failed-256/356698/3):
>

---

<div class="post-metadata">

**Author:** ![andavidos](https://forums.solar2d.com/user_avatar/forums.solar2d.com/andavidos/32/4040_2.png) [@andavidos](https://forums.solar2d.com/u/andavidos)\
**Post date:** [August 6, 2024, 10:01pm UTC](https://forums.solar2d.com/t/android-build-failure-error-256/356699/3 "2024-08-06T22:01:20Z")

</div>

Hi,

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

---

<div class="post-metadata">

**Author:** ![mt0](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/m/c89c15/32.png) [@mt0](https://forums.solar2d.com/u/mt0)\
**Post date:** [August 8, 2024, 9:36am UTC](https://forums.solar2d.com/t/android-build-failure-error-256/356699/4 "2024-08-08T09:36:36Z")

</div>

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.

```auto
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.

---

<div class="post-metadata">

**Author:** ![mt0](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/m/c89c15/32.png) [@mt0](https://forums.solar2d.com/u/mt0)\
**Post date:** [August 9, 2024, 8:40am UTC](https://forums.solar2d.com/t/android-build-failure-error-256/356699/6 "2024-08-09T08:40:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![troylyndon](https://forums.solar2d.com/user_avatar/forums.solar2d.com/troylyndon/32/313_2.png) [@troylyndon](https://forums.solar2d.com/u/troylyndon)\
**Post date:** [August 11, 2024, 9:34pm UTC](https://forums.solar2d.com/t/android-build-failure-error-256/356699/7 "2024-08-11T21:34:24Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![vlads](https://forums.solar2d.com/user_avatar/forums.solar2d.com/vlads/32/29_2.png) [@vlads](https://forums.solar2d.com/u/vlads)\
**Post date:** [August 12, 2024, 3:05am UTC](https://forums.solar2d.com/t/android-build-failure-error-256/356699/8 "2024-08-12T03:05:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![perflubron](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/p/e56c9b/32.png) [@perflubron](https://forums.solar2d.com/u/perflubron)\
**Post date:** [August 16, 2024, 7:05am UTC](https://forums.solar2d.com/t/android-build-failure-error-256/356699/9 "2024-08-16T07:05:21Z")

</div>

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

```auto
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

---

<div class="post-metadata">

**Author:** ![clang](https://forums.solar2d.com/user_avatar/forums.solar2d.com/clang/32/3368_2.png) [@clang](https://forums.solar2d.com/u/clang)\
**Post date:** [August 16, 2024, 10:00am UTC](https://forums.solar2d.com/t/android-build-failure-error-256/356699/10 "2024-08-16T10:00:17Z")

</div>

Please try temporary solution [Android 14 (API Level 34) - #61 by clang](https://forums.solar2d.com/t/android-14-api-level-34/356635/61)

---

<div class="post-metadata">

**Author:** ![rbm1155](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/r/50afbb/32.png) [@rbm1155](https://forums.solar2d.com/u/rbm1155)\
**Post date:** [August 17, 2024, 5:52pm UTC](https://forums.solar2d.com/t/android-build-failure-error-256/356699/11 "2024-08-17T17:52:26Z")

</div>

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](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](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](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

---

<div class="post-metadata">

**Author:** ![rbm1155](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/r/50afbb/32.png) [@rbm1155](https://forums.solar2d.com/u/rbm1155)\
**Post date:** [August 17, 2024, 6:39pm UTC](https://forums.solar2d.com/t/android-build-failure-error-256/356699/12 "2024-08-17T18:39:34Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![rbm1155](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/r/50afbb/32.png) [@rbm1155](https://forums.solar2d.com/u/rbm1155)\
**Post date:** [August 17, 2024, 6:41pm UTC](https://forums.solar2d.com/t/android-build-failure-error-256/356699/13 "2024-08-17T18:41:05Z")

</div>

![image](https://forums.solar2d.com/uploads/default/original/2X/0/03cb4880e03a8b8fe8e0e5c3a294670a6cd84193.png)

---

<div class="post-metadata">

**Author:** ![colinmorgan](https://forums.solar2d.com/user_avatar/forums.solar2d.com/colinmorgan/32/241_2.png) [@colinmorgan](https://forums.solar2d.com/u/colinmorgan)\
**Post date:** [August 17, 2024, 8:35pm UTC](https://forums.solar2d.com/t/android-build-failure-error-256/356699/14 "2024-08-17T20:35:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![perflubron](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/p/e56c9b/32.png) [@perflubron](https://forums.solar2d.com/u/perflubron)\
**Post date:** [August 18, 2024, 7:23am UTC](https://forums.solar2d.com/t/android-build-failure-error-256/356699/15 "2024-08-18T07:23:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dmarques42](https://forums.solar2d.com/user_avatar/forums.solar2d.com/dmarques42/32/190_2.png) [@dmarques42](https://forums.solar2d.com/u/dmarques42)\
**Post date:** [August 18, 2024, 5:25pm UTC](https://forums.solar2d.com/t/android-build-failure-error-256/356699/16 "2024-08-18T17:25:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dmarques42](https://forums.solar2d.com/user_avatar/forums.solar2d.com/dmarques42/32/190_2.png) [@dmarques42](https://forums.solar2d.com/u/dmarques42)\
**Post date:** [August 18, 2024, 6:23pm UTC](https://forums.solar2d.com/t/android-build-failure-error-256/356699/17 "2024-08-18T18:23:22Z")

</div>

> [@clang](#):
>
> Please try temporary solution [Android 14 (API Level 34) - #61 by clang](https://forums.solar2d.com/t/android-14-api-level-34/356635/61)

The gradle patch worked. Thank you.

---

<div class="post-metadata">

**Author:** ![Kan98](https://forums.solar2d.com/user_avatar/forums.solar2d.com/kan98/32/2224_2.png) [@Kan98](https://forums.solar2d.com/u/Kan98)\
**Post date:** [August 19, 2024, 5:35am UTC](https://forums.solar2d.com/t/android-build-failure-error-256/356699/18 "2024-08-19T05:35:33Z")

</div>

3709 has been released and the issue has been fixed.

> **[Release Solar2D 2024.3709 · coronalabs/corona](https://github.com/coronalabs/corona/releases/tag/3709)**
>
> Changes since previous build:
> 
> 
> Maintenance (efe3161)
> 
> 
> Android: maintenance (#724) (f099dda)
> For linux it is recommended to use snap:
> sudo snap install solar2d

---

<div class="post-metadata">

**Author:** ![troylyndon](https://forums.solar2d.com/user_avatar/forums.solar2d.com/troylyndon/32/313_2.png) [@troylyndon](https://forums.solar2d.com/u/troylyndon)\
**Post date:** [August 31, 2024, 10:47pm UTC](https://forums.solar2d.com/t/android-build-failure-error-256/356699/19 "2024-08-31T22:47:31Z")

</div>

@Kan98 This issue may be fixed, but…same error but different circumstances here: [Android Build Error 256 in 3707, 3708 and 3709](https://forums.solar2d.com/t/android-build-error-256-in-3707-3708-and-3709/356783)
