1

DexGuard recently switched to a license system with only 1 license per application. This caused this issue when I'm using applicationIdSuffix for other buildtypes:

The package name from the AndroidManifest.xml file [com.example.myapp.debug] doesn't match the package name [com.example.myapp] from your DexGuard license [path/to/dexguard-license.txt]

Is there a workaround or option available this?

dumazy
  • 13,857
  • 12
  • 66
  • 113

2 Answers2

1

The package name from the AndroidManifest.xml file [com.example.myapp.debug] doesn't match the package name [com.example.myapp] from your DexGuard license [path/to/dexguard-license.txt]

It means that you can use DexGuard only for the package name com.example.myapp and you can't use it for the package com.example.myapp.debug.

You can:

  • buy a second license for the other package
  • disable DexGuard for the debug build type

For the second option:

 buildTypes {
        release {
            proguardFile getDefaultDexGuardFile('dexguard-release.pro')
            proguardFile 'dexguard-project.txt'

            signingConfig signingConfigs.release
        }
        debug {
            //nothing
        }
    }
Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841
  • We've mailed GuardSquare, the company behind DexGuard, about this and they were able to add a suffix to the license. But I'm curious about your second option, disabling dexguard for the debug build. Is this possible? – dumazy May 08 '17 at 14:57
  • @dumazy Updated the answer. – Gabriele Mariotti May 08 '17 at 15:16
  • okay, I'm having a different issue with this concerning Fabric. To upload obfuscation files to Fabric/Crashlytics, you need to apply the Dexguard plugin before the Fabric plugin. But then Fabric will try crashlyticsStoreDeobsDebug and crash because of "Task with path 'dexguardDebug' not found in project" – dumazy May 08 '17 at 15:21
  • No problem. This is a different issue. Thanks for your answer. – dumazy May 09 '17 at 06:30
0

So, eventually GuardSquare updated our license so we could use '.debug' applicationIdSuffix with the same license. As Gabriele suggests in the answers, you could just turn DexGuard off or buy a second license.

dumazy
  • 13,857
  • 12
  • 66
  • 113