4

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

Mohit Suthar
  • 8,725
  • 10
  • 37
  • 67

2 Answers2

2

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?

joextodd
  • 694
  • 4
  • 9
  • 2
    @Bijan: this answer may be wrong (I don't know either way), but it does appear to attempt to answer the question. –  Jul 04 '18 at 15:45
  • @MohitSuthar have you tried the starter project at https://github.com/chirp/chirp-connect-react-native-starter? Running ./gradlew assembleRelease with proguard enabled on this project builds successfully. – joextodd Jul 06 '18 at 11:33
1

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
Shubham Sejpal
  • 3,556
  • 2
  • 14
  • 31