0

After adding a library to project that contains native code (embedded as .so), my app build started to crash when running the dexguard<Flavor><BuildType> task. The error says:

Caused by: java.io.IOException: Can't read [/home/user/project/app/build/intermediates/transforms/mergeJniLibs/flavor/buildType/folders/2000/1f/main(;;;;;;lib/*/*.so,lib/*/gdb*)] (Can't write resource [lib/x86/filecointainedonlibrary.so] (New string section exceeds the length of the original: 243 > 242))
Rafael Toledo
  • 5,599
  • 6
  • 23
  • 33

1 Answers1

1

That might happen when DexGuard obfuscates your native methods.

The latest version 7.1.29 should fix this issue, please give it a try.

Edit: The troubleshooting section of the DexGuard manual describes work-arounds when this happens. They basically keep names of native methods.

T. Neidhart
  • 6,060
  • 2
  • 15
  • 38