Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JNI DETECTED ERROR IN APPLICATION: JNI FindClass called with pending exception java.lang.NoSuchMethodError: no non-static method "Lchirpconnect/SDK

I am using Chirp Android SDK for sharing data over sound, its working pretty well.

But when I am enabling my proguard then this JNI exeption is throwing, i have tried many ways to overcome this issue like add proguard rule in proguard file lets see :

-keep class io.chirp.connect.Chirpconnect { *; }

-keep class chirpconnect.Chirpconnect { *; }

-keepclasseswithmembernames class * { native methods; }

But not found any solutions?

I have just added one chirp SDK AAR in a libs folder and add this

repositories {
    flatDir {
        dirs 'libs'
    }
}

to build.gradle file

like image 269
Mohit Suthar Avatar asked Jun 05 '18 08:06

Mohit Suthar


2 Answers

Please try this may it will helps you :-

-keep class io.chirp.connect.** { *; }
-keep class chirpconnect.** { *; }
-keep class javax.annotation.** { *; }
-dontwarn javax.annotation.**
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
like image 81
Shubham Sejpal Avatar answered Nov 08 '22 20:11

Shubham Sejpal


Sorry I don't have enough reputation to comment.

The class name is actually io.chirp.connect.ChirpConnect with a capital C for Connect. Does this solve the issue?

like image 42
joextodd Avatar answered Nov 08 '22 20:11

joextodd