Gradlew failed due to download timeout

178 views
Skip to first unread message

Pairman

unread,
Nov 26, 2023, 10:18:13 AM11/26/23
to Kivy users support
Hello! I'm using p4a to build an app using flask. Everything worked until "gradlew failed" when building apk. I guess this is possibly due to download timeout for "gradle-7.4.1-all.zip", and my server indeed has poor connectivity to "service.gradle.org".

Is there any method to download the file manually or switch to a mirror? Thanks in advance.

The log:
```
[DEBUG]:        dos2unix: converting file /home/ubuntu/.local/share/python-for-android/dists/unnamed_dist_1/gradlew to Unix format...
[DEBUG]:   -> running gradlew clean assembleRelease
[DEBUG]:        Exception in thread "main" java.lang.RuntimeException: Timeout of 120000 reached waiting for exclusive access to file: /home/ubuntu/.gradle/wrapper/dists/gradle-7.4.1-all/8bevta3mh7872g50ecurigeld/gradle-7.4.1-all.zip
[DEBUG]:                at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:61)
[DEBUG]:                at org.gradle.wrapper.Install.createDist(Install.java:44)
[DEBUG]:                at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:126)
[DEBUG]:                at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:56)
Exception in thread background thread for pid 2461317:
Traceback (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/home/ubuntu/.local/lib/python3.10/site-packages/sh.py", line 1641, in wrap
    fn(*rgs, **kwargs)
  File "/home/ubuntu/.local/lib/python3.10/site-packages/sh.py", line 2569, in background_thread
    handle_exit_code(exit_code)
  File "/home/ubuntu/.local/lib/python3.10/site-packages/sh.py", line 2269, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/home/ubuntu/.local/lib/python3.10/site-packages/sh.py", line 869, in handle_command_exit_code
    raise exc
```

Pairman

unread,
Nov 26, 2023, 10:25:40 AM11/26/23
to Kivy users support

Update: I thought the directory name of gradle download would be changed every time randomly. I was wrong. I manually downloaded gradle from a mirror and p4a worked perfrctly again.
Reply all
Reply to author
Forward
0 new messages