google-ai-edge / mediapipe

Cross-platform, customizable ML solutions for live and streaming media.
https://mediapipe.dev
Apache License 2.0
26.71k stars 5.08k forks source link

build android aar failed #5523

Closed yejiabin9 closed 1 month ago

yejiabin9 commented 1 month ago

OS Platform and Distribution

macos 14.4, android 14

Compiler version

Build failure with CLANG 9.0.0

Programming Language and version

python 3.9

Installed using virtualenv? pip? Conda?(if python)

No response

MediaPipe version

0.10.13

Bazel version

7.1.1

XCode and Tulsi versions (if iOS)

No response

Android SDK and NDK versions (if android)

No response

Android AAR (if android)

Yes

OpenCV version (if running on desktop)

No response

Describe the problem

when i build android arr, it always say target 'mediapipe_face_detection.aar' not declared in package

Complete Logs

BUILD code is 
load("//mediapipe/java/com/google/mediapipe:mediapipe_aar.bzl", "mediapipe_aar")

mediapipe_aar(
    name = "mediapipe_hand_tracking",
    calculators = ["//mediapipe/graphs/hand_tracking:mobile_calculators"],
)

my build cmd is 
bazel build -c opt --strip=ALWAYS \
    --host_crosstool_top=@bazel_tools//tools/cpp:toolchain \
    --fat_apk_cpu=arm64-v8a,armeabi-v7a \
    --legacy_whole_archive=0 \
    --features=-legacy_whole_archive \
    --copt=-fvisibility=hidden \
    --copt=-ffunction-sections \
    --copt=-fdata-sections \
    --copt=-fstack-protector \
    --copt=-Oz \
    --copt=-fomit-frame-pointer \
    --copt=-DABSL_MIN_LOG_LEVEL=2 \
    --linkopt=-Wl,--gc-sections,--strip-all \
    //mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_example:mediapipe_face_detection.aar

build result is 
ERROR: Skipping '//mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_example:mediapipe_face_detection.aar': no such target '//mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_example:mediapipe_face_detection.aar': target 'mediapipe_face_detection.aar' not declared in package 'mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_example' defined by /Users/xiejiabin/Documents/code/mediapipe/mediapipe/mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_example/BUILD
ERROR: no such target '//mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_example:mediapipe_face_detection.aar': target 'mediapipe_face_detection.aar' not declared in package 'mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_example' defined by /Users/xiejiabin/Documents/code/mediapipe/mediapipe/mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_example/BUILD
kuaashish commented 1 month ago

Hi @yejiabin9,

Please use our Maven package to build the Face Detection Task API, as the AAR method is no longer supported. You can find the steps to set up the Android configuration here and instructions to migrate the face detection in Android here.

Thank you!!

github-actions[bot] commented 1 month ago

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.

github-actions[bot] commented 1 month ago

This issue was closed due to lack of activity after being marked stale for past 7 days.

google-ml-butler[bot] commented 1 month ago

Are you satisfied with the resolution of your issue? Yes No