0

I am upgrading from Dexguard 6 to 7 and have a question regarding library obfuscation. With Dexguard 6, I could obfuscate my library that is a Module inside Android Studio and then use this module in my app with it as a local dependency:

dependencies {
    compile project(':sdk')
}

However, when I try to do this with Dexguard 7.0.31 I get the exception:

Execution failed for task ':sdk:transformClassesAndResourcesWithProguardForRelease'. > java.io.FileNotFoundException: /lib/dexguard-library-release.pro (No such file or directory)

Elias
  • 472
  • 3
  • 17
  • Did you check if the file DEXGUARD-FOLDER/lib/dexguard-library-release.pro exists. If it does, then you set up DexGuard incorrectly in Gradle, if it does not, then copy it from the DexGuard zip file. – lionscribe Sep 22 '16 at 20:23
  • It's part of the dexguard.jar which I added in my gradle.build: flatDir { dirs 'dexguard/7.0.31/' }. It's working correctly for the app but not for local library projects. – Elias Sep 23 '16 at 06:32
  • When compiling libraries you use dexguard-library-release.p ro file rather than dexguard-release.pro file. Just make sure the file exists. – lionscribe Sep 23 '16 at 12:04
  • That file is part of dexguard.jar right? – Elias Sep 23 '16 at 12:36
  • No. It is included with all the DexGuard files in the lib directory. All it is, is the default configuration used by DexGuard for libraries. You reference it in your Gradle when you call getDefaultDexGuard... – lionscribe Sep 23 '16 at 14:54

1 Answers1

0

You probably have set minifyEnabled true in your library project, which will not work in combination with DexGuard. Just set the flag to false and it should be ok.

Recent versions of DexGuard will check the flag and issue an error.

T. Neidhart
  • 6,060
  • 2
  • 15
  • 38
  • 1
    The configuration was like this, dexguard in library and proguard in app that uses library. – Elias Nov 24 '16 at 10:03
  • @Elias did you find any solution regarding this..? – takharsh Dec 16 '21 at 14:42
  • My problem was actually a mismatch between android gradle plugin and dexguard. Check the dexguard website what plugins are supported ;-) and update if needed. – Elias Dec 17 '21 at 15:11