Lalita Garg
Lalita Garg

Reputation: 11

Error on running bazel build to use mediapipe pose detection

I want to use mediapipe pose detection in Android studio and I am trying to make. Aar file to use it. So on running



build -c opt --config=android_arm64 mediapipe/modules/pose_detection:*,


I am getting Error

ERROR: C:/users/asrock/downloads/mediapipe-master/mediapipe/framework/tool/BUILD:109:10: While resolving toolchains for target //mediapipe/framework/tool:encode_as_c_string: invalid registered toolchain '@local_execution_config_python//:py_toolchain': target does not provide the DeclaredToolchainInfo provider
ERROR: Analysis of target '//mediapipe/modules/pose_detection:pose_detection_cpu.inc' failed; build aborted:
INFO: Elapsed time: 0.441s
INFO: 0 processes.
FAILED: Build did NOT complete

I got some errors previously too but I solved it by asking ChatGPT

I have mediapipe master downloaded from github. I hope you understand the problem

Upvotes: 1

Views: 533

Answers (1)

Saurav Prakash
Saurav Prakash

Reputation: 654

Paste this in WORKSPACE file:

android_sdk_repository(
    name = "androidsdk",
    path = "/Users/saurav/Library/Android/sdk"
)

android_ndk_repository(
    name = "androidndk",
    path = "/Users/saurav/Library/Android/sdk/ndk/21.4.7075529"
)

If you have not added workspace file: Add android_ndk_repository() and android_sdk_repository() rules into the WORKSPACE file as the following:

$ echo "android_sdk_repository(name = \"androidsdk\")" >> WORKSPACE
$ echo "android_ndk_repository(name = \"androidndk\", api_level=21)" >> WORKSPACE

Refer : https://developers.google.com/mediapipe/framework/getting_started/android

Upvotes: 0

Related Questions