gpt4 book ai didi

android - cwac-loaderex 和 Proguard

转载 作者:行者123 更新时间:2023-11-29 16:05:14 26 4
gpt4 key购买 nike

我正在使用@CommonsWare 的CWAC-LoaderEx库及其 SQLiteCursorLoader 在我的应用程序中。

但是当我尝试使用 Proguard 时,我收到了以下警告:

Warning: com.commonsware.cwac.loaderex.SQLCipherCursorLoader: can't find referenced class net.sqlcipher.database.SQLiteOpenHelper
Warning: com.commonsware.cwac.loaderex.SQLCipherCursorLoader$DeleteTask: can't find referenced class net.sqlcipher.database.SQLiteDatabase
Warning: com.commonsware.cwac.loaderex.SQLCipherCursorLoader$InsertTask: can't find referenced class net.sqlcipher.database.SQLiteDatabase
Warning: com.commonsware.cwac.loaderex.SQLCipherCursorLoader$ReplaceTask: can't find referenced class net.sqlcipher.database.SQLiteDatabase
Warning: com.commonsware.cwac.loaderex.SQLCipherCursorLoader$UpdateTask: can't find referenced class net.sqlcipher.database.SQLiteDatabase
Warning: com.commonsware.cwac.loaderex.SQLCipherUtils: can't find referenced class net.sqlcipher.database.SQLiteDatabase
Warning: com.commonsware.cwac.loaderex.SQLCipherUtils: can't find referenced class net.sqlcipher.database.SQLiteDatabase$CursorFactory
Warning: com.commonsware.cwac.loaderex.acl.SQLCipherCursorLoader: can't find referenced class net.sqlcipher.database.SQLiteDatabase
Warning: com.commonsware.cwac.loaderex.acl.SQLCipherCursorLoader$DeleteTask: can't find referenced class net.sqlcipher.database.SQLiteDatabase

...等等。我尝试添加到我的 proguardcfg 文件中:

-libraryjars libs/CWAC-LoaderEx.jar
-keep class net.sqlcipher.** { *; }
-keep class net.sqlcipher.database.** { *; }

除了默认的 proguard-android.txt,包含在 SDK 中。

有人有什么想法吗?谢谢!

最佳答案

如果您的应用程序没有使用 SQLCipher,您可以告诉 ProGuard 忽略丢失的类。例如:

-dontwarn net.sqlcipher.**

请参阅 ProGuard 手册 > 故障排除 > Warning: can't find referenced class .

您不应在配置文件中指定 -injars-libraryjars 选项。 Ant/Eclipse/Gradle 构建过程已经根据你的项目的内容。

请参阅 ProGuard 手册 > 故障排除 > Note: duplicate definition of program/library class

关于android - cwac-loaderex 和 Proguard,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19438553/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com