Skip to content Skip to sidebar Skip to footer

Unzip From Assets Doesn't Work When Using Proguard

I have a 20MB database stored in the apk's assets, which on first run is extracted for use. To do this I use PackageManager pm = context.getPackageManager(); String apkFile = pm.ge

Solution 1:

ProGuard optimizations may uncover bugs in the code that is processed. For instance, optimizations can potentially change the timing of multi-threaded code, causing problems if it is not synchronized properly. You could double-check your code. For instance, are myInput and myOutput fields, that are manipulated in other threads? Is the problem deterministic?

ProGuard optimizations may also uncover bugs in the virtual machine or in run-time classes. It's possible that you've run into a bug that has been fixed in recent versions of Android.

Since the processed code does work on recent versions of Android, it's probably not a bug in ProGuard, but you could check if the latest release makes a difference (version 4.7 at this time of writing).

You can report the problem on ProGuard's bug tracker, with a sample that illustrates the problem (at least with more complete code and a complete stack trace). In the meanwhile, you can work around it by switching off optimization.

Post a Comment for "Unzip From Assets Doesn't Work When Using Proguard"