How to build release with minifyEnabled = true in Android?

67 views
Skip to first unread message

Albus D.

unread,
Mar 8, 2024, 11:12:58 PM3/8/24
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 AM5/7/24
to MediaPipe
Is it resolved. I am also facing same problem.

Ajay Asija

unread,
Oct 5, 2024, 9:43:18 AM10/5/24
to MediaPipe
i am getting same error please help
Reply all
Reply to author
Forward
0 new messages