sqlite android 绑定的 Proguard 配置 [英] Proguard configuration for sqlite android bindings

查看:61
本文介绍了sqlite android 绑定的 Proguard 配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 SQLite android 绑定在我的 android 应用程序中有一个自定义的加密 SQLite 数据库.一切正常,我即将发布我的应用程序.我正在尝试使用 ProGuard 进行代码混淆和压缩,但似乎不适用于 SQLite android 绑定.我发布的应用程序在启动时崩溃,因为它找不到 SQLite 使用的几个 .so 文件.我不确定保留这些库的正确 ProGuard 规则应该是什么.

I am trying to use SQLite android bindings to have a custom encrypted SQLite DB in my android app. It all works fine and I am about to publish my app. I am trying to use ProGuard for code obfuscation and compression but does not seem to work fine with SQLite android bindings. My released app crashes on startup because it cannot find few .so files used by SQLite. I am not sure what should be the correct ProGuard rule to keep those libraries.

现在我只将这个添加到我的 ProGuard 中:

Right now I have added only this to my ProGuard:

-keep class org.sqlite.**

推荐答案

通常,

-keep class org.sqlite.** { *; }
-keep class org.sqlite.database.** { *; }

会成功.

验证您的 mapping.txt 是否已经完成了 ProGuard,并确保您的 模型没有改名.如果是这样,您可能需要

Verify your mapping.txt for what ProGuard is already done, and make sure that your models are not got renamed. If so, you may need

-keep class com.your.modelspackage.**
-keepclassmembers com.your.modelspackage.** { *; }  

希望能帮到你

这篇关于sqlite android 绑定的 Proguard 配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆