Open 307509256 opened 3 years ago
0.7.6目前无法编译多手势的aar,想问下作者是怎么编译的aar
load("//mediapipe/java/com/google/mediapipe:mediapipe_aar.bzl", "mediapipe_aar")
mediapipe_aar( name = "mediapipe_hand_tracking", calculators = ["//mediapipe/graphs/hand_tracking:multi_hand_mobile_calculators"], )
target 'multi_hand_mobile_calculators' not declared in package 'mediapipe/graphs/hand_tracking' defined by /home/gongjia/rsyncd/dest/mediapipe/mediapipe/graphs/hand_tracking/BUILD and referenced by '//mediapipe/examples/android/src/java/com/google/mediapipe/apps/build_aar:libmediapipe_jni.so' ERROR: Analysis of target '//mediapipe/examples/android/src/java/com/google/mediapipe/apps/build_aar:mediapipe_hand_tracking' failed; build aborted: Analysis failed
已经更新最新版本 。
0.7.6当前无法编译多手势的aar,想问下作者是怎么编译的aar
load(“ // mediapipe / java / com / google / mediapipe:mediapipe_aar.bzl”,“ mediapipe_aar”)
mediapipe_aar( name =“ mediapipe_hand_tracking”, 计算器= [“ // mediapipe / graphs / hand_tracking:multi_hand_mobile_calculators”], )
写法没有问题 ,不过最新版不区分多手单手。
我编译出来的aar包,解压出来的classes.jar里面没有RectProto,但我看你的里面有 java里面也有引用import com.google.mediapipe.formats.proto.RectProto;
是不是编译选项的问题? bazel build -c opt --fat_apk_cpu=arm64-v8a //mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_hand_tracking:mp_hand_tracking_aar
查了下:我的这个文件下./mediapipe/java/com/google/mediapipe/mediapipe_aar.bzl ... android_library( name = name + "_android_lib", srcs = [ "//mediapipe/java/com/google/mediapipe/components:java_src", "//mediapipe/java/com/google/mediapipe/framework:java_src", "//mediapipe/java/com/google/mediapipe/glutil:java_src", "com/google/mediapipe/proto/CalculatorProto.java", "com/google/mediapipe/formats/proto/LandmarkProto.java", "com/google/mediapipe/formats/proto/DetectionProto.java", "com/google/mediapipe/formats/proto/LocationDataProto.java", "com/google/mediapipe/formats/annotation/proto/RasterizationProto.java", ],
没有 "com/google/mediapipe/formats/proto/RectProto.java",
没有就自己加嘛,要什么加什么接口 。
没有就自己加嘛,要什么加什么接口 。
在中间加了com/google/mediapipe/formats/proto/RectProto.java,它不认,报错,没有这个类
ERROR: /home/gongjia/rsyncd/dest/mediapipe-master/mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_hand_tracking/BUILD:3:14: //mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_hand_tracking:mp_hand_tracking_aar_android_lib: missing input file '//mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_hand_tracking:com/google/mediapipe/formats/proto/RectProto.java' Target //mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_hand_tracking:mp_hand_tracking_aar failed to build Use --verbose_failures to see the command lines of failed build steps. ERROR: /home/gongjia/rsyncd/dest/mediapipe-master/mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_hand_tracking/BUILD:3:14 1 input file(s) do not exist
"com/google/mediapipe/formats/proto/LandmarkProto.java", 你看这个类 加了什么 ,你就参照一下 。加什么 就可以了。应该要加两个地方 。
搞定了,谢谢群主
搞定了,谢谢群主
meet the same problem, can you give me a hand, thanks!!
没有就自己加嘛,要什么加什么接口 。
在中间加了com/google/mediapipe/formats/proto/RectProto.java,它不认,报错,没有这个类
ERROR: /home/gongjia/rsyncd/dest/mediapipe-master/mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_hand_tracking/BUILD:3:14: //mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_hand_tracking:mp_hand_tracking_aar_android_lib: missing input file '//mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_hand_tracking:com/google/mediapipe/formats/proto/RectProto.java' Target //mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_hand_tracking:mp_hand_tracking_aar failed to build Use --verbose_failures to see the command lines of failed build steps. ERROR: /home/gongjia/rsyncd/dest/mediapipe-master/mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_hand_tracking/BUILD:3:14 1 input file(s) do not exist I have met the same problem, but there is no RectProto.java file
搞定了,谢谢群主
meet the same problem, can you give me a hand, thanks!!
Add an interface in mediapipe_aar.bzl by yourself
0.76