Frage

I'm using @CommonsWare's CWAC-LoaderEx library and its SQLiteCursorLoader in my application.

But when I try to use Proguard, I got the following warnings:

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

... and so on. I have tried adding to my proguardcfg file:

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

besides the default proguard-android.txt, included in the SDK.

Does anyone have any ideas? Thanks!

War es hilfreich?

Lösung 2

since I'm not using SQLCipher, can I just tell Proguard to ignore it?

You can tell ProGuard to get rid of com.commonsware.cwac.loaderex.SQLCipherCursorLoader, presumably.

The warnings are just that: warnings. I assumed (incorrectly) that you were crashing in addition to the warnings. So long as you never tried using SQLCipherCursorLoader, the warnings would not cause you any particular problems.

Andere Tipps

If your application isn't using SQLCipher, you can tell ProGuard to ignore the missing classes. For instance:

-dontwarn net.sqlcipher.**

See the ProGuard manual > Troubleshooting > Warning: can't find referenced class.

You shouldn't specify -injars or -libraryjars options in your configuration file. The Ant/Eclipse/Gradle build process already automatically specifies all the necessary -injars, -outjars, and -libraryjars for you, based on the contents of your project.

See the ProGuard manual > Troubleshooting > Note: duplicate definition of program/library class

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top