e-mission / e-mission-docs

Repository for docs and issues. If you need help, please file an issue here. Public conversations are better for open source projects than private email.
https://e-mission.readthedocs.io/en/latest
BSD 3-Clause "New" or "Revised" License
15 stars 34 forks source link

Unable to build for Android (maybe certificate issue?) #1093

Open JGreenlee opened 1 month ago

JGreenlee commented 1 month ago

I have been running into this issue which prevents me from building for Android.

Everything looks normal until:

> Task :wrapper FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':wrapper'.
> Test of distribution url https://services.gradle.org/distributions/gradle-8.7-bin.zip failed. Please check the values set with --gradle-distribution-url and --gradle-version.

* 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
1 actionable task: 1 executed
Command failed with exit code 1: gradle -p /Users/jgreenle/e-mission-phone/platforms/android/tools wrapper --gradle-version 8.7

I can see that the scripts install Gradle 8.10 successfully, but then attempt to download Gradle 8.7 (which fails for me but is successful in the CI)

This leads me to believe 2 things:

shankari commented 1 month ago

Gradle 8.10 is not being used, neither on my setup or the CI

This is true. The build should download its own gradle. I actually removed the gradle install in https://github.com/e-mission/e-mission-phone/commit/399e9e7a4f83ed7d67fbf2e249179fa073cfec68

But then it turns out that if there is no system gradle, then the build fails so I restored it https://github.com/e-mission/e-mission-phone/commit/3b6ecd5fda65ac8cae2bf9127a0789cc7fadb3c2

Have you pulled the changes for the upgrade and deleted all your existing setup? I remember there was a gradle issue during the upgrade that was fixed by upgrading android. And I had to delete all platforms and plugins after the upgrade. https://github.com/e-mission/e-mission-docs/issues/1079#issuecomment-2311242503 and later

JGreenlee commented 1 month ago

I am able to reproduce this on a freshly cloned repo, so I don't think it is the issue you described. I have also tried reinstalling the Android SDK to no avail.