DexGuard 最近切换到每个应用程序只有 1 个许可证的许可证系统。当我对其他构建类型使用 applicationIdSuffix
时,这导致了这个问题:
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]
是否有可用的解决方法或选项?
最佳答案
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]
这意味着您只能对包名 com.example.myapp
使用 DexGuard 而不能对包名 com.example.myapp.debug
.
您可以:
- 为另一个包购买第二个许可证
- 为调试构建类型禁用 DexGuard
对于第二个选项:
buildTypes {
release {
proguardFile getDefaultDexGuardFile('dexguard-release.pro')
proguardFile 'dexguard-project.txt'
signingConfig signingConfigs.release
}
debug {
//nothing
}
}
关于android - 带有 applicationIdSuffix 的 DexGuard,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43850456/