google-ai-edge / mediapipe

Cross-platform, customizable ML solutions for live and streaming media.
https://ai.google.dev/edge/mediapipe
Apache License 2.0
27.78k stars 5.18k forks source link

SEVERE: Error during merging resources #4530

Closed cancan101 closed 9 months ago

cancan101 commented 1 year ago

OS Platform and Distribution

MacOS 12.6

Compiler version

No response

Programming Language and version

Java

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

No response

MediaPipe version

master (4c4a1d93b28f6f40ffcb11aa11cfbfc26ef0dc68)

Bazel version

6.1.1

XCode and Tulsi versions (if iOS)

No response

Android SDK and NDK versions (if android)

ndk 21.4.7075529

Android AAR (if android)

None

OpenCV version (if running on desktop)

No response

Describe the problem

Trying to build for Android using:

bazel build -c opt --config=android_arm64 mediapipe/examples/android/src/java/com/google/mediapipe/apps/hairsegmentationgpu

Complete Logs

WARNING: /Users/alex/git/mediapipe/mediapipe/framework/tool/BUILD:197:24: in cc_library rule //mediapipe/framework/tool:field_data_cc_proto: target '//mediapipe/framework/tool:field_data_cc_proto' depends on deprecated target '@com_google_protobuf//:cc_wkt_protos': Only for backward compatibility. Do not use.
WARNING: /Users/alex/git/mediapipe/mediapipe/framework/BUILD:56:24: in cc_library rule //mediapipe/framework:calculator_cc_proto: target '//mediapipe/framework:calculator_cc_proto' depends on deprecated target '@com_google_protobuf//:cc_wkt_protos': Only for backward compatibility. Do not use.
INFO: Analyzed target //mediapipe/examples/android/src/java/com/google/mediapipe/apps/hairsegmentationgpu:hairsegmentationgpu (26 packages loaded, 9468 targets configured).
INFO: Found 1 target...
ERROR: /private/var/tmp/_bazel_alex/4dc1fb9db305e87ce0a36c4e4d7a44b9/external/maven/BUILD:109:11: Merging compiled Android resources for @maven//:androidx_asynclayoutinflater_asynclayoutinflater failed: (Exit 1): ResourceProcessorBusyBox failed: error executing command (from target @maven//:androidx_asynclayoutinflater_asynclayoutinflater)
  (cd /private/var/tmp/_bazel_alex/4dc1fb9db305e87ce0a36c4e4d7a44b9/sandbox/darwin-sandbox/9505/execroot/mediapipe && \
  exec env - \
    PATH='/Users/alex/Library/Caches/bazelisk/downloads/bazelbuild/bazel-6.1.1-darwin-x86_64/bin:/Users/alex/.rbenv/shims:/usr/local/Cellar/pyenv-virtualenv/1.1.5/shims:/Users/alex/.pyenv/shims:/Users/alex/.nvm/versions/node/v19.9.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin' \
  bazel-out/darwin-opt-exec-50AE0418/bin/external/bazel_tools/src/tools/android/java/com/google/devtools/build/android/ResourceProcessorBusyBox --tool MERGE_COMPILED -- --classJarOutput bazel-out/android-arm64-v8a-opt/bin/external/maven/androidx_asynclayoutinflater_asynclayoutinflater_resources.jar --targetLabel @maven//:androidx_asynclayoutinflater_asynclayoutinflater --manifestOutput bazel-out/android-arm64-v8a-opt/bin/external/maven/androidx_asynclayoutinflater_asynclayoutinflater_processed_manifest/AndroidManifest.xml --androidJar external/androidsdk/platforms/android-21/android.jar --primaryManifest bazel-out/android-arm64-v8a-opt/bin/external/maven/_aar/androidx_asynclayoutinflater_asynclayoutinflater/AndroidManifest.xml --primaryData ';;@maven//:androidx_asynclayoutinflater_asynclayoutinflater;bazel-out/android-arm64-v8a-opt/bin/external/maven/androidx_asynclayoutinflater_asynclayoutinflater_symbols/symbols.zip' --directData ';;@maven//:androidx_core_core;bazel-out/android-arm64-v8a-opt/bin/external/maven/androidx_core_core_symbols/symbols.zip' --data ';;@maven//:androidx_arch_core_core_runtime;bazel-out/android-arm64-v8a-opt/bin/external/maven/androidx_arch_core_core_runtime_symbols/symbols.zip&;;@maven//:androidx_lifecycle_lifecycle_runtime;bazel-out/android-arm64-v8a-opt/bin/external/maven/androidx_lifecycle_lifecycle_runtime_symbols/symbols.zip&;;@maven//:androidx_versionedparcelable_versionedparcelable;bazel-out/android-arm64-v8a-opt/bin/external/maven/androidx_versionedparcelable_versionedparcelable_symbols/symbols.zip')
# Configuration: a6fdc5657bf28db43f2237f12a8eee0f416f9d313e7298546da48abce37707bc
# Execution platform: @local_execution_config_platform//:platform

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
Jun 09, 2023 12:31:55 PM com.google.devtools.build.android.AndroidCompiledResourceMergingAction main
SEVERE: Error during merging resources
com.google.devtools.build.android.AndroidResourceMerger$MergingException: Error during merging
    at com.google.devtools.build.android.AndroidResourceMerger$MergingException.wrapException(AndroidResourceMerger.java:74)
    at com.google.devtools.build.android.AndroidResourceMerger.mergeCompiledData(AndroidResourceMerger.java:227)
    at com.google.devtools.build.android.AndroidCompiledResourceMergingAction.main(AndroidCompiledResourceMergingAction.java:231)
    at com.google.devtools.build.android.ResourceProcessorBusyBox$Tool$3.call(ResourceProcessorBusyBox.java:85)
    at com.google.devtools.build.android.ResourceProcessorBusyBox.processRequest(ResourceProcessorBusyBox.java:251)
    at com.google.devtools.build.android.ResourceProcessorBusyBox.main(ResourceProcessorBusyBox.java:181)
Caused by: java.io.IOException: com.google.devtools.build.android.AndroidFrameworkAttrIdProvider$AttrLookupException: Android attribute not found: fontStyle
    at com.google.devtools.build.android.AndroidResourceClassWriter.flush(AndroidResourceClassWriter.java:122)
    at com.google.devtools.build.android.UnwrittenMergedAndroidData.writeResourceClass(UnwrittenMergedAndroidData.java:91)
    at com.google.devtools.build.android.AndroidResourceMerger.mergeCompiledData(AndroidResourceMerger.java:219)
    ... 4 more
Caused by: com.google.devtools.build.android.AndroidFrameworkAttrIdProvider$AttrLookupException: Android attribute not found: fontStyle
    at com.google.devtools.build.android.AndroidFrameworkAttrIdJar.getAttrId(AndroidFrameworkAttrIdJar.java:48)
    at com.google.devtools.build.android.PlaceholderIdFieldInitializerBuilder.getStyleableInitializers(PlaceholderIdFieldInitializerBuilder.java:329)
    at com.google.devtools.build.android.PlaceholderIdFieldInitializerBuilder.build(PlaceholderIdFieldInitializerBuilder.java:238)
    at com.google.devtools.build.android.AndroidResourceClassWriter.flush(AndroidResourceClassWriter.java:114)
    ... 6 more

Jun 09, 2023 12:31:55 PM com.google.devtools.build.android.ResourceProcessorBusyBox processRequest
SEVERE: Error during merging
Target //mediapipe/examples/android/src/java/com/google/mediapipe/apps/hairsegmentationgpu:hairsegmentationgpu failed to build
INFO: Elapsed time: 5.132s, Critical Path: 3.71s
INFO: 156 processes: 129 internal, 27 darwin-sandbox.
FAILED: Build did NOT complete successfully
WitmanTzahi commented 1 year ago

Hi,

Happend to me too

bazel build -c opt --config=android_arm64 mediapipe/examples/android/src/java/com/google/mediapipe/apps/handtrackinggpu:handtrackinggpu WARNING: /Users/tzahiwitman/mediapipe/mediapipe/framework/BUILD:56:24: in cc_library rule //mediapipe/framework:calculator_cc_proto: target '//mediapipe/framework:calculator_cc_proto' depends on deprecated target '@com_google_protobuf//:cc_wkt_protos': Only for backward compatibility. Do not use. WARNING: /Users/tzahiwitman/mediapipe/mediapipe/framework/tool/BUILD:197:24: in cc_library rule //mediapipe/framework/tool:field_data_cc_proto: target '//mediapipe/framework/tool:field_data_cc_proto' depends on deprecated target '@com_google_protobuf//:cc_wkt_protos': Only for backward compatibility. Do not use. WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/google/XNNPACK/archive/b9d4073a6913891ce9cbd8965c8d506075d2a45a.zip failed: class java.io.FileNotFoundException GET returned 404 Not Found INFO: Analyzed target //mediapipe/examples/android/src/java/com/google/mediapipe/apps/handtrackinggpu:handtrackinggpu (0 packages loaded, 0 targets configured). INFO: Found 1 target... ERROR: /Users/tzahiwitman/mediapipe/mediapipe/java/com/google/mediapipe/framework/image/BUILD:19:16: Merging compiled Android resources for //mediapipe/java/com/google/mediapipe/framework/image:image failed: (Exit 1): ResourceProcessorBusyBox failed: error executing command (from target //mediapipe/java/com/google/mediapipe/framework/image:image) bazel-out/darwin_arm64-opt-exec-50AE0418/bin/external/bazel_tools/src/tools/android/java/com/google/devtools/build/android/ResourceProcessorBusyBox --tool MERGE_COMPILED -- --classJarOutput ... (remaining 17 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging Jun 13, 2023 6:08:08 PM com.google.devtools.build.android.AndroidCompiledResourceMergingAction main SEVERE: Error during merging resources com.google.devtools.build.android.AndroidResourceMerger$MergingException: Error during merging at com.google.devtools.build.android.AndroidResourceMerger$MergingException.wrapException(AndroidResourceMerger.java:74) at com.google.devtools.build.android.AndroidResourceMerger.mergeCompiledData(AndroidResourceMerger.java:227) at com.google.devtools.build.android.AndroidCompiledResourceMergingAction.main(AndroidCompiledResourceMergingAction.java:231) at com.google.devtools.build.android.ResourceProcessorBusyBox$Tool$3.call(ResourceProcessorBusyBox.java:85) at com.google.devtools.build.android.ResourceProcessorBusyBox.processRequest(ResourceProcessorBusyBox.java:251) at com.google.devtools.build.android.ResourceProcessorBusyBox.main(ResourceProcessorBusyBox.java:181) Caused by: java.io.IOException: com.google.devtools.build.android.AndroidFrameworkAttrIdProvider$AttrLookupException: Android attribute not found: fontVariationSettings at com.google.devtools.build.android.AndroidResourceClassWriter.flush(AndroidResourceClassWriter.java:122) at com.google.devtools.build.android.UnwrittenMergedAndroidData.writeResourceClass(UnwrittenMergedAndroidData.java:91) at com.google.devtools.build.android.AndroidResourceMerger.mergeCompiledData(AndroidResourceMerger.java:219) ... 4 more Caused by: com.google.devtools.build.android.AndroidFrameworkAttrIdProvider$AttrLookupException: Android attribute not found: fontVariationSettings at com.google.devtools.build.android.AndroidFrameworkAttrIdJar.getAttrId(AndroidFrameworkAttrIdJar.java:48) at com.google.devtools.build.android.PlaceholderIdFieldInitializerBuilder.getStyleableInitializers(PlaceholderIdFieldInitializerBuilder.java:329) at com.google.devtools.build.android.PlaceholderIdFieldInitializerBuilder.build(PlaceholderIdFieldInitializerBuilder.java:238) at com.google.devtools.build.android.AndroidResourceClassWriter.flush(AndroidResourceClassWriter.java:114) ... 6 more

Jun 13, 2023 6:08:08 PM com.google.devtools.build.android.ResourceProcessorBusyBox processRequest SEVERE: Error during merging Target //mediapipe/examples/android/src/java/com/google/mediapipe/apps/handtrackinggpu:handtrackinggpu failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 1.177s, Critical Path: 1.03s INFO: 85 processes: 85 internal. FAILED: Build did NOT complete successfully

kuaashish commented 1 year ago

@cancan101,

Sorry for the delayed response. This issue is already known to us, And We are working towards the fix the issue. We will let you know once any update becomes available. Thank you

WitmanTzahi commented 1 year ago

10nx

From: kuaashish @.> Reply-To: google/mediapipe @.> Date: Friday, 7 July 2023 at 12:37 To: google/mediapipe @.> Cc: Tzahi Witman @.>, Comment @.***> Subject: Re: [google/mediapipe] SEVERE: Error during merging resources (Issue #4530)

@cancan101,

Sorry for the delayed response. This issue is already known to us, And We are working towards the fix the issue. We will let you know once any update becomes available. Thank you

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

rolandeke commented 1 year ago

Has this issue been resolved?? I am getting the same error message I am trying to build and AAR file but my build fails with the same merging resources error.

WitmanTzahi commented 1 year ago

NO

From: Chinedum Roland Eke @.> Reply-To: google/mediapipe @.> Date: Wednesday, 19 July 2023 at 20:28 To: google/mediapipe @.> Cc: Tzahi Witman @.>, Comment @.***> Subject: Re: [google/mediapipe] SEVERE: Error during merging resources (Issue #4530)

Has this issue been resolved?? I am getting the same error message I am trying to build and AAR file but my build fails with the same merging resources error.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

kuaashish commented 10 months ago

Hi @cancan101,

Could you please confirm if you still require assistance with this matter? If so, we would like to inform you that AAR solutions for app development are no longer under maintenance, and we anticipate that the reported issue will not be resolved.

Instead, we recommend utilizing our new Image Segmentation Task API. This API is equipped to handle hair segmentation and represents an enhanced version of our legacy Hair Segmentation Solution. Further details can be found here.

Additionally, you may refer to the corresponding Overview documentation and implementation instructions for Android on this page. Should you encounter any issues during implementation, please feel free to report them to us.

Thank you!!

github-actions[bot] commented 9 months 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 9 months ago

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

google-ml-butler[bot] commented 9 months ago

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