ProGuard and Debugging

Android’s infamous dex limit is a huge problem. One of the ways you can fix the problem is to use ProGuard. If you decide to use it, the you can look forward to 2 things.

  1. Longer build times.
  2. Not being able to debug your application, especially if you enable ProGuard in dev mode.

The first problem does not have a silver bullet solution; however the second one does. Adding the following 3 lines of code to your proguard-rules.pro file will make your life a lot easier (and you will be able to debug your code).

-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable
-printmapping outputfile.txt
 
10
Kudos
 
10
Kudos

Now read this

A Photo a Day. (Adventures with a Sony A7R)

I have been eyeing a Sony A7R for a long time (over a year now). Yeah, I know that there is an A7R ii; but I don’t really care about the 5-axis image stabilization (given that i will probably end up using a tripod). In an effort to up my... Continue →