I’m currently working on my react native project and wanted to build apk to send my friend. I did everything according to this instruction https://reactnative.dev/docs/signed-apk-android and some video on youtube.
Everything worked fine till the moment when I tried to execute ./gradlew clean and then another command starting with ./gradlew. It just starts downloading it from https://services.gradle.org/distributions/gradle-8.3-all.zip and then fails.
I tried downloading it manually and everything seemed good, gradle -v command works fine from any console, but ./gradlew command still do the same.
I would be really grateful if someone could help me
2
Answers
I already solved the problem. When I opened Android studio, it also tried to install gradle from the same url, but failed and said about some problems with proxy. All I did is just connected to another network and it worked fine.
I’m not sure why it failed, you should provide more information.
However, if you want to use local files directly, you can find the
distributionUrl
ingradle/wrapper/gradle-wrapper.properties
and modify it to the local file you need. Regarding this, I suggest you check the relevant documentation to determine the file path expression of your operating system.Of course, you can also consider using mirror sources to solve possible network problems.