UnsatisfiedLinkError on Android

I added the new rules in a file called proguard-rules.pro which is provided as part of the application.

Here is the part of build.gradle file where proguard files are entered.

    buildTypes {
        release {
            signingConfig signingConfigs.release
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    ...

The proguard-android.txt and proguard-android-optimize.txt are available by default and are not edited in the application layer. I think proguard merges the rules in the list of files we provide.

So, I figured out the difference in the OP and the recent error. In the OP I had included -dontobfuscate rule. If I remove the proguard configuration you provided and include -dontobfuscate again, I get that same error… And… if I include -dontobfuscate with your proguard configuration, the couchbase libraries are loading fine.

This time it will work for sure… :stuck_out_tongue_winking_eye:
… it should work wo/ that -dontobfuscate flag.

-dontwarn edu.umd.cs.findbugs.annotations.SuppressFBWarnings

-keep class com.couchbase.lite.ConnectionStatus { <init>(...); }
-keep class com.couchbase.lite.LiteCoreException { static <methods>; }
-keep class com.couchbase.lite.internal.replicator.CBLTrustManager {
    public java.util.List checkServerTrusted(java.security.cert.X509Certificate[], java.lang.String, java.lang.String);
}
-keep interface com.couchbase.lite.internal.ReplicationCollection$C4Filter
-keep class com.couchbase.lite.internal.ReplicationCollection {
    static <methods>;
    <fields>;
}
-keep class com.couchbase.lite.internal.fleece.FLSliceResult {
    <fields>;
    <init>(...);
}
-keep class com.couchbase.lite.internal.core.C4* {
    static <methods>;
    <fields>;
    <init>(...);
 }

@blake.meike

It does work without obfuscation. Here is the next warning I am getting. Not sure if this warning can cause any problems or not. I’m yet to dissect the logs.

CouchbaseLite/DATABASE  <app-id>            W  "<database-id>" is not a valid database name. A valid database name has a limit of 100 characters and starts with a letter or digit, followed by letters, digits, dashes, or underscores.
CouchbaseLite/DATABASE  <app-id>            W  [JAVA] Database.log.getFile().getConfig() is now null: logging is disabled.  Log files required for product support are not being generated.

Yaaa…

If the db problem persists, please start another post to deal with it.

Yes. Will do @blake.meike. Much appreciate your quick turn around.