How to build release with minifyEnabled = true in Android?

36 views
Skip to first unread message

Albus D.

unread,
Mar 8, 2024, 11:12:58 PMMar 8
to MediaPipe
Hi, I am developing an Android app which use "com.google.mediapipe:tasks-audio:0.10.10". It work fine in debug mode but when I build release apk with minifyEnabled = true, it's not work anymore.
I added some rules in my proguard-rules.pro:
-keep class com.google.mediapipe.solutioncore.** {*;}
-keep class com.google.protobuf.** {*;}
-keepclassmembers class * extends com.google.protobuf.GeneratedMessageLite {
*;
}
and when I run, it showed error 
Rejecting re-init on previously-failed class java.lang.Class<com.google.mediapipe.framework.Graph>: java.lang.ExceptionInInitializerError:
                                                                                                      at com.google.mediapipe.tasks.core.a com.google.mediapipe.tasks.core.a.b(android.content.Context, oa.b, k.m) (SourceFile:-1)
                                                                                                      at ia.d ia.d.b(android.content.Context, ia.f) (SourceFile:-1)

Jatinder Syall

unread,
May 7, 2024, 2:12:30 AMMay 7
to MediaPipe
Is it resolved. I am also facing same problem.
Reply all
Reply to author
Forward
0 new messages