Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLCipher 4.1.0: minSdkVersion = 26 #432

Closed
cokeperez opened this issue Mar 19, 2019 · 8 comments
Closed

SQLCipher 4.1.0: minSdkVersion = 26 #432

cokeperez opened this issue Mar 19, 2019 · 8 comments

Comments

@cokeperez
Copy link

SQLCipher for Android version: 4.1.0

We are trying to update from 4.0.1 to 4.1.0 but seems now SQLCipher minSdkVersion is set to 26. Maybe is a mistake when you build the new version? It's strange that android:targetSdkVersion is equal than android:minSdkVersion

SQLCipher AndroidManifest.xml from aar

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="net.sqlcipher"
    android:versionCode="1"
    android:versionName="4.1.0" >

    <uses-sdk
        android:minSdkVersion="26"
        android:targetSdkVersion="26" />

Logcat

java.lang.RuntimeException: Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version 26 declared in library [net.zetetic:android-database-sqlcipher:4.1.0] /Users/coke/.gradle/caches/transforms-1/files-1.1/android-database-sqlcipher-4.1.0.aar/14e8aa7480861ae83886b97f994094a2/AndroidManifest.xml as the library might be using APIs not available in 14
	Suggestion: use a compatible library with a minSdk of at most 14,
		or increase this project's minSdk version to at least 26,
		or use tools:overrideLibrary="net.sqlcipher" to force usage (may lead to runtime failures)
	at com.android.builder.core.AndroidBuilder.mergeManifestsForApplication(AndroidBuilder.java:556)
...
...

Thank you!

@developernotes
Copy link
Member

Hi @cokeperez,

Thank you for your report, that was unintentional. We are bumping the minSdkVersion to 21, however the targetSdkVersion will be 26. We will be publishing a new release shortly.

@developernotes
Copy link
Member

Hi @cokeperez

SQLCipher for Android 4.1.1 is now available with the minSdkVersion set to 21. Would you give that a try and report back? Thanks!

@cokeperez
Copy link
Author

cokeperez commented Mar 20, 2019

HI @developernotes,

yes, it works now with minSdkVersion = 21. Thanks.

But this is a problem for us. Why did you decide to bump minSdkVersion to API21? Our app is present in countries with a lot of devices older than API 21 and this change forces us to stay in 4.0.1 forever.

There are currently around 10%-15% (much more in our case) of active devices worldwide in Google Play between APIs 16 and 21, we wouldn't like to lose that many users.

@developernotes
Copy link
Member

Hi @cokeperez

We recently released SQLCipher for Android 4.1.2 which adjusts our API support back down to 14 on 32-but CPU's. Would you give that a try and let us know your results? Thanks!

@cokeperez
Copy link
Author

Hi @developernotes,

thank you for your quick help. The problem with the minSdkVersion during the build has been solved 👏 .

But now we have problems in some APIs/devices when the app tries to load SQLCipher. I think is the same (or similar) problem than this.

For now we've tried a sample app with:

  • Note8 / Android 8 64 bits: app works.
  • Samsung Tab A 7" / Android 5 32 bits: app works.
  • All emulators x86 - x86_64 / All APIs: app crash.
  • Physical devices with Android 4 32 bits: app crash.

We will continue testing and updating you if there is anything new.

Thanks!

03-21 16:19:57.284 7270-7270/com.example.myapplication3 E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.myapplication3, PID: 7270
    java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "stdout" referenced by "/data/app/com.example.myapplication3-1/lib/x86_64/libsqlcipher.so"...
        at java.lang.Runtime.loadLibrary(Runtime.java:371)
        at java.lang.System.loadLibrary(System.java:989)
        at net.sqlcipher.database.SQLiteDatabase$1.loadLibraries(SQLiteDatabase.java:223)
        at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:240)
        at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:219)
        at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:212)
        at com.example.myapplication3.MainActivity.onCreate(MainActivity.java:16)
        at android.app.Activity.performCreate(Activity.java:5937)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
        at android.app.ActivityThread.access$800(ActivityThread.java:144)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:135)
        at android.app.ActivityThread.main(ActivityThread.java:5221)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)

@developernotes
Copy link
Member

Hi @cokeperez

We have recently published SQLCipher for Android 4.1.3 which should address the crashing behavior you experienced on certain devices and emulators. It should be available via Maven Central within the next hour or so. Would you try out 4.1.3 when you get the opportunity and let us know your results? Thanks!

@cokeperez
Copy link
Author

It works! Tested in emulators and physical devices with Android 4.x.

Thank you very much!

@developernotes
Copy link
Member

Hi @cokeperez

That's excellent, thanks for the quick response! I will close this ticket now that the issue has been resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants