适用于Android的SQLCipher:icudt46l.zip真的需要吗?

前端之家收集整理的这篇文章主要介绍了适用于Android的SQLCipher:icudt46l.zip真的需要吗?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我当时并不需要本地化数据文件icudt46l.zip,但如果我不在Nexus 5中包含它,我会收到运行时错误

E / AndroidRuntime(4341):引起:net.sqlcipher.database.sqliteException:不是错误

这意味着整个sqlCipher for Android需要大约7MB的额外文件
– 2.7MB资产/ icudt46l.zip
– 0.2MB lib / armeabi / libdatabase_sqlcipher.so
– 2.3MB lib / armeabi / libsqlcipher_android.so
– 0.4MB lib / armeabi / libstlport_shared.so
– 0.1MB lib / commons-codec.jar
– 1.1MB lib / guava-r09.jar
– 0.1MB lib / sqlcipher.jar

是否其他人都需要包含文件icudt46l.zip?

解决方法

引用 the documentation for SQLCipher for Android

sqlCipher for Android depends on localization data from 07001. sqlCipher for Android will attempt to use a system provided ICU localization data file called icudt46l.dat located in the /system/usr/icu directory if available. If that is not found,sqlCipher for Android will attempt to unzip the icudt46l.zip file located within the applications asset directory. It is recommended that the icudt46.zip file be included with your application for best platform compatibility. If you need to adjust the size of the localization data for your application,a ICU data library customizer is available 07002.

我不知道任何版本的Android系统提供的ICU数据满足sqlCipher的需求.

猜你在找的Android相关文章