title: Is there a way to prevent Android app code shrinker R8 from changing line numbers?
body: <p>Android Studio started to use <a href="https://developer.android.com/studio/build/shrink-code" rel="noreferrer">R8</a> instead of ProGuard by default recently. </p>
  
  <p>The stack traces from ProGuard are fairly easy to understand without using any tools despite code is obfuscated. Let's use the following example:</p>
  
  <pre><code> java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference
      at net.foo.anroid.Foo.wb.d(SourceFile:453)
      at net.foo.anroid.Foo.wb.a(SourceFile:213)
      at net.foo.anroid.Foo.wb.n(SourceFile:103)
      at net.foo.anroid.Foo.qa.run(Unknown Source:2)
      at java.lang.Thread.run(Thread.java:764)
  </code></pre>
  
  <p>Usually I know exactly to which file net.foo.anroid.Foo.wb corresponds, and the line numbers (e.g. 453, 213...) are the actual lines numbers in the source file for ProGuard.  </p>
  
  <p>However, for R8, the only way to figure out which line is which is looking them up in mapping.txt.  </p>
  
  <p>This is really a significant nuisance. If there is no good way to locate the source code quickly from a stack trace, I will go back to ProGuard for this reason alone.</p>
  
  <p>Is there a way to prevent R8 from changing line numbers?</p>