Skip to content

6. Android troubleshooting

Palominos Sylvain edited this page Feb 26, 2019 · 2 revisions

minifyEnabled Unable to access CRS file: epsg error

It seems there is a confusion with class names of CTS when obfuscation takes place(check 1 and 2 stackoverflow links).

org.cts should be excluded from the process of obfuscation. To do so you just need to add the following line in proguard-rules.pro file which is configured to be used in the gradle script.

-keep class org.cts.** { *; }

And inside the gradle script, force the app to use this proguard file.

...
   debug {
      minifyEnabled true
      buildConfigField "String", ...
      buildConfigField "String", ...
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
   }
...

Here is the location of the proguard file

default

The content of the file

-keep class org.cts.** { *; }
  1. https://stackoverflow.com/questions/39098768/after-setting-the-minifyenabled-as-true-im-getting-the-following-error
  2. https://stackoverflow.com/questions/36249005/minifyenabled-true-leads-to-crash-on-app-start

Thank you for the solution to ptsagkis.