You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added output_stream:"DETECTIONS:output_detections" in file face_detection_mobile_gpu.pbtxt and generate AAR so that I can get face landmark (eyes, nose, mouth) in Android Studio. Application successfully started but within few seconds it crashes with below error in Android Studio logcat.
JNI DETECTED ERROR IN APPLICATION: JNI GetObjectClass called with pending exception java.lang.NoClassDefFoundError: com.google.mediapipe.formats.proto.DetectionProto$Detection
at com.google.protobuf.Parser com.google.mediapipe.formats.proto.DetectionProto$Detection.parser() (DetectionProto.java:2530)
at void com.merkaba.fdapp.MainActivity.lambda$onCreate$0(com.google.mediapipe.framework.Packet) (MainActivity.java:94)
at void com.merkaba.fdapp.-$$Lambda$MainActivity$W4IHs8_JiSEesmggE2fzGoufaI4.process(com.google.mediapipe.framework.Packet) (lambda:-1)
Caused by: java.lang.NoSuchMethodError: No static method registerDefaultInstance(Ljava/lang/Class;Lcom/google/protobuf/GeneratedMessageLite;)V in class Lcom/google/protobuf/GeneratedMessageLite; or its super classes (declaration of 'com.google.protobuf.GeneratedMessageLite' appears in /data/app/com.merkaba.fdapp-XNQLDVhmEWMohTQNQIgyRw==/base.apk)
at void com.google.mediapipe.formats.proto.DetectionProto$Detection.() (DetectionProto.java:2519)
at com.google.protobuf.Parser com.google.mediapipe.formats.proto.DetectionProto$Detection.parser() (DetectionProto.java:2530)
at void com.merkaba.fdapp.MainActivity.lambda$onCreate$0(com.google.mediapipe.framework.Packet) (MainActivity.java:94)
at void com.merkaba.fdapp.-$$Lambda$MainActivity$W4IHs8_JiSEesmggE2fzGoufaI4.process(com.google.mediapipe.framework.Packet) (lambda:-1)
Same error when tried to run object detection. App successfully started on my Android device but then few seconds later it crashed with same message:
JNI DETECTED ERROR IN APPLICATION: JNI GetObjectClass called with pending exception java.lang.NoClassDefFoundError: com.google.mediapipe.formats.proto.DetectionProto$Detection
at com.google.protobuf.Parser com.google.mediapipe.formats.proto.DetectionProto$Detection.parser() (DetectionProto.java:2530)
........
This time I didn't change any files related to object detection since the functionality of output stream callback already there.
Thank you.
Problem solved. Implement protocol buffer full version (not lite) in Gradle solved the issue. Apparently the method being called in GetProtoVector is not exist in protobuf lite version.
Thanks!
Hi team,
I added output_stream:"DETECTIONS:output_detections" in file face_detection_mobile_gpu.pbtxt and generate AAR so that I can get face landmark (eyes, nose, mouth) in Android Studio. Application successfully started but within few seconds it crashes with below error in Android Studio logcat.
JNI DETECTED ERROR IN APPLICATION: JNI GetObjectClass called with pending exception java.lang.NoClassDefFoundError: com.google.mediapipe.formats.proto.DetectionProto$Detection
at com.google.protobuf.Parser com.google.mediapipe.formats.proto.DetectionProto$Detection.parser() (DetectionProto.java:2530)
at void com.merkaba.fdapp.MainActivity.lambda$onCreate$0(com.google.mediapipe.framework.Packet) (MainActivity.java:94)
at void com.merkaba.fdapp.-$$Lambda$MainActivity$W4IHs8_JiSEesmggE2fzGoufaI4.process(com.google.mediapipe.framework.Packet) (lambda:-1)
Caused by: java.lang.NoSuchMethodError: No static method registerDefaultInstance(Ljava/lang/Class;Lcom/google/protobuf/GeneratedMessageLite;)V in class Lcom/google/protobuf/GeneratedMessageLite; or its super classes (declaration of 'com.google.protobuf.GeneratedMessageLite' appears in /data/app/com.merkaba.fdapp-XNQLDVhmEWMohTQNQIgyRw==/base.apk)
at void com.google.mediapipe.formats.proto.DetectionProto$Detection.() (DetectionProto.java:2519)
at com.google.protobuf.Parser com.google.mediapipe.formats.proto.DetectionProto$Detection.parser() (DetectionProto.java:2530)
at void com.merkaba.fdapp.MainActivity.lambda$onCreate$0(com.google.mediapipe.framework.Packet) (MainActivity.java:94)
at void com.merkaba.fdapp.-$$Lambda$MainActivity$W4IHs8_JiSEesmggE2fzGoufaI4.process(com.google.mediapipe.framework.Packet) (lambda:-1)
in call to GetObjectClass
"Thread-10" prio=5 tid=29 Runnable
| group="main" sCount=0 dsCount=0 flags=0 obj=0x132c0000 self=0x70df76f800
| sysTid=28752 nice=0 cgrp=default sched=0/0 handle=0x70dfb094f0
| state=R schedstat=( 1351719 2775416 11 ) utm=0 stm=0 core=6 HZ=100
| stack=0x70dfa0e000-0x70dfa10000 stackSize=1009KB
| held mutexes= "mutator lock"(shared held)
native: #00 pc 00000000003c1688 /system/lib64/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits>&, int, BacktraceMap*, char const*, art::ArtMethod*, void*, bool)+220)
native: #1 pc 000000000048ecf4 /system/lib64/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits>&, bool, BacktraceMap*, bool) const+352)
native: #2 pc 00000000002e4bb8 /system/lib64/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+968)
native: #3 pc 00000000002e4fc8 /system/lib64/libart.so (art::JavaVMExt::JniAbortV(char const*, char const*, std::__va_list)+116)
native: #4 pc 00000000000fcffc /system/lib64/libart.so (art::(anonymous namespace)::ScopedCheck::AbortF(char const*, ...)+148)
native: #5 pc 00000000000fb9d8 /system/lib64/libart.so (art::(anonymous namespace)::ScopedCheck::CheckPossibleHeapValue(art::ScopedObjectAccess&, char, art::(anonymous namespace)::JniValueType)+1152)
.............
Did I miss something?
Thank you
The text was updated successfully, but these errors were encountered: