-
-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build Andorid Library Failed-Connect timed out #536
Comments
Yes.
I think it's a network issue, too. I've just merged #537, which allows arbitrary options to be passed to Bazel. python build.py build --bazel_build_opts "--experimental_scale_timeouts=10.0 --http_timeout_scaling=10.0" --android arm64 -vv I hope these options will mitigate your issue (note that you need to rebuild the Docker image to copy this new |
Thank you for your help. I tried to reinstall my docker desktop and rebuild the Docker image with the same build command before got your reply. But i got errors below: docker build -t mediapipe_unity:linux . -f docker/linux/x86_64/Dockerfile
|
You should specify P.S.
I don't know why you had to reinstall Docker Desktop, but it should have cleared your local cached layers. |
Thanks a lot. I tried many times and strived to improve internet speed. I also replaced the build.py with the #537 version, and used the build command you provided. I don't know exactly which modification made the difference. Anyway now i built android library successfully and built an apk with unity editor. By the way, i met the DllNotFoundException problem on my older device. On another android device, the apk can run except that the displayed image is y-flipped. I used the command "adb shell getprop ro.build.version.sdk" to check api level for my older android device and got "26". I checked the TroubleShooting part on wiki and now I'm tring to rebuild the android library with option "--android_ndk_api_level 21". Is this the right way to solve this problem ? |
Maybe, but it depends on the cause. On the other hand, if the CPU of your device is armv7, you may want to build libraries with the
I hope this issue is already fixed by #504 (included in v0.8.4). |
Yes, this is my situation. But after rebuilt the android library specifying --android_ndk_api_level, my older device still got the same problem. I have tried ndk api level with 26, 21 and 19. here is my logs from monitor:
|
I see.
Maybe you just downloaded |
I didn't pull the whole commit. If i could make --android_ndk_api_level option work, which level should i specified ? 26(same as my device) or 19 (same as unity used during building) ? Thank you for your help. |
I think You can check if you have built unzip mediapipe_android.aar
objdump -T jni/arm64-v8a/libmediapipe_jni.so | grep aligned_malloc |
Yes, I modified |
i want to how use MediaPipeUnityPlugin in android。can you tell me step |
Plugin Version or Commit ID
v0.8.3
Unity Version
2020.3.30f1
Your Host OS
Windows 10
Target Platform
Android
[Windows Only] Visual Studio C++ and Windows SDK Version
VisualStudio C++: 14.29.30133
Windows SDK: 10.0.19041.0
[Linux Only] GCC/G++ and GLIBC Version
No response
[Android Only] Android Build Tools and NDK Version
Build Tools: 30.0.2
NDK:19.0.5232133
[iOS Only] XCode Version
No response
Command Sequences
docker build -t mediapipe_unity:linux . -f docker/linux/x86_64/Dockerfile
docker run --cpus=6 --memory=16g --mount type=bind,src=E:\SVN\YZDH\VideoBasedFacialAnim\MediaPipeUnityPluginDocker\Packages,dst=/home/mediapipe/Packages --mount type=bind,src=E:\SVN\YZDH\VideoBasedFacialAnim\MediaPipeUnityPluginDocker\Assets,dst=/home/mediapipe/Assets -it mediapipe_unity:linux
python build.py build --android arm64 -vv
Log
INFO (build.py): Building protobuf sources...
DEBUG (build.py): Running
bazel build -c opt --verbose_failures //mediapipe_api:mediapipe_proto_srcs
2022/04/18 02:08:02 Downloading https://releases.bazel.build/4.2.1/release/bazel-4.2.1-linux-x86_64...
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
WARNING: Download from https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz failed: class java.io.IOException connect timed out
INFO: Repository build_bazel_rules_apple instantiated at:
/home/mediapipe/WORKSPACE:341:13: in
Repository rule http_archive defined at:
/home/mediapipe/.cache/bazel/_bazel_mediapipe/6c11c387a04fa8f17c87a5c6db6ee555/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in
WARNING: Download from https://github.com/bazelbuild/rules_apple/releases/download/0.32.0/rules_apple.0.32.0.tar.gz failed: class java.io.IOException connect timed out
ERROR: An error occurred during the fetch of repository 'build_bazel_rules_apple':
Traceback (most recent call last):
File "/home/mediapipe/.cache/bazel/_bazel_mediapipe/6c11c387a04fa8f17c87a5c6db6ee555/external/bazel_tools/tools/build_defs/repo/http.bzl", line 111, column 45, in _http_archive_impl
download_info = ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error downloading [https://github.com/bazelbuild/rules_apple/releases/download/0.32.0/rules_apple.0.32.0.tar.gz] to /home/mediapipe/.cache/bazel/_bazel_mediapipe/6c11c387a04fa8f17c87a5c6db6ee555/external/build_bazel_rules_apple/temp7019480873336431819/rules_apple.0.32.0.tar.gz: connect timed out
ERROR: Error fetching repository: Traceback (most recent call last):
File "/home/mediapipe/.cache/bazel/_bazel_mediapipe/6c11c387a04fa8f17c87a5c6db6ee555/external/bazel_tools/tools/build_defs/repo/http.bzl", line 111, column 45, in _http_archive_impl
download_info = ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error downloading [https://github.com/bazelbuild/rules_apple/releases/download/0.32.0/rules_apple.0.32.0.tar.gz] to /home/mediapipe/.cache/bazel/_bazel_mediapipe/6c11c387a04fa8f17c87a5c6db6ee555/external/build_bazel_rules_apple/temp7019480873336431819/rules_apple.0.32.0.tar.gz: connect timed out
ERROR: no such package '@build_bazel_rules_apple//apple': java.io.IOException: Error downloading [https://github.com/bazelbuild/rules_apple/releases/download/0.32.0/rules_apple.0.32.0.tar.gz] to /home/mediapipe/.cache/bazel/_bazel_mediapipe/6c11c387a04fa8f17c87a5c6db6ee555/external/build_bazel_rules_apple/temp7019480873336431819/rules_apple.0.32.0.tar.gz: connect timed out
INFO: Elapsed time: 406.781s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
Traceback (most recent call last):
File "/home/mediapipe/build.py", line 448, in
Argument().command().run()
File "/home/mediapipe/build.py", line 114, in run
self._run_command(self._build_proto_srcs_commands())
File "/home/mediapipe/build.py", line 54, in _run_command
return subprocess.run(' '.join(command_list), check=True, shell=shell)
File "/usr/lib/python3.10/subprocess.py", line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'bazel build -c opt --verbose_failures //mediapipe_api:mediapipe_proto_srcs' returned non-zero exit status 1.
Additional Context
i built successfully by [Docker Windows Container] last month, but i skipped the step 5 during the building.
now i want to build an android apk. My understanding is that i need to build android library first, then i can build the apk by unity editor like normal unity games. Is my understanding correct?
i followed the instructions in https://github.com/homuler/MediaPipeUnityPlugin/wiki/Installation-Guide#docker-linux-container to build android library and got errors in the log. It seems like something about network, but i am not sure. i'd appreciate it if you could help me.
The text was updated successfully, but these errors were encountered: