RedApparat / FaceDetector

Face detection for your Android app
Apache License 2.0
1.17k stars 197 forks source link

Release apk is getting crashed with below error #42

Open harishkandekar opened 4 years ago

harishkandekar commented 4 years ago

Abort message: 'JNI DETECTED ERROR IN APPLICATION: JNI NewGlobalRef called with pending exception java.lang.ClassNotFoundException: Didn't find class "io.fotoapparat.facedetector.FaceDetectorWrapper$CppProxy" on path: DexPathList[[zip file "/data/app/com.example.andy.myapplication-Srioie4wYP_3uHNep4-U4A==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.andy.myapplication-Srioie4wYP_3uHNep4-U4A==/lib/arm64, /data/app/com.example.andy.myapplication-Srioie4wYP_3uHNep4-U4A==/base.apk!/lib/arm64-v8a, /system/lib64]] at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:196) at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379) at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312) at java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader, java.lang.Class) (Runtime.java:-2) at java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader) (Runtime.java:1115) at void java.lang.Runtime.loadLibrary0(java.lang.ClassLoader, java.lang.Class, java.lang.String) (Runtime.java:1069) at void java.lang.Runtime.loadLibrary0(java.lang.Class, java.lang.String) (Runtime.java:1007) at void java.lang.System.loadLibrary(java.lang.String) (System.java:1667) at void e.a.d.b.() (:13) at e.a.d.b e.a.d.b.a(android.content.Context) (:28) at void e.a.d.e.a.(e.a.d.e.a$b) (:27) at void e.a.d.e.a.(e.a.d.e.a$b, e.a.d.e.a$a) (:19) at e.a.d.e.a e.a.d.e.a$b.a() (:100) at e.a.a com.example.andy.myapplication.MainActivity.a(e.a.h.c) (:192) at void com.example.andy.myapplication.MainActivity.onCreate(android.os.Bundle) (:111) at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:7955) at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7944) at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1307) at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:3463) at android.app.Activity android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.app.servertransaction.PendingTransactionActions, android.content.Intent) (ActivityThread.java:3635) at void android.app.servertransaction.LaunchActivityItem.execute(android.app.ClientTransactionHandler, android.os.IBinder, android.app.servertransaction.PendingTransactionActions) (LaunchActivityItem.java:83) at void android.app.servertransaction.TransactionExecutor.executeCallbacks(android.app.servertransaction.ClientTransaction) (TransactionExecutor.java:135) at void android.app.servertransaction.TransactionExecutor.execute(android.app.servertransaction.ClientTransaction) (TransactionExecutor.java:95) at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:2175) at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:107) at void android.os.Looper.loop() (Looper.java:237) at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:7860) at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2) at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:493) at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:1075)

    in call to NewGlobalRef
    from java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader, java.lang.Class)'
harishkandekar commented 4 years ago

if minifyEnabled is true then the above error is coming

harishkandekar commented 4 years ago

anyone there ?

harishkandekar commented 4 years ago

fixed error 👍 -keep class io.fotoapparat. { *; } -keep interface io.fotoapparat.* { ; } -keep enum io.fotoapparat. { *; }