3

My app works fine when it's unsigned (debugging, etc..), also when exporting without ProGuard. But when I export it with ProGuard, When a piece of code containing native methods that I import is executing, it crashes.

What can I do? I guess that getting the stack trace, but I have no idea how to do that...

I have tried this: How do I obtain crash-data from my Android application? But no files actually appear where they should (I guess I have done that wrong too :()

The device MUST be saving crash stack traces SOMEWHERE. Where are they?

Community
  • 1
  • 1
Jong
  • 9,045
  • 3
  • 34
  • 66

2 Answers2

3

The proguard.cfg in your project has a collection of ignore rules for classes that shouldn't be obfuscated. You can essentially ignore everything and slowly obfuscate code each pass. Native methods, methods called by reflection-indirection shouldn't be obfuscated.

Jeremy Edwards
  • 14,620
  • 17
  • 74
  • 99
  • Thanks :) I have found that on my own a few hours ago but your post did summarize it for the following readers. – Jong Nov 15 '11 at 18:59
1

If you are using Fragment class add the following line to your proguard.cfg file:

-keep public class * extends android.app.Fragment
Czechnology
  • 14,832
  • 10
  • 62
  • 88
Murat
  • 3,084
  • 37
  • 55