Setting up dexguard license file in android studio

I didn't find dexguard-license.txt file in dexguard.please, help me in setting up gradle in android studio here is my gradle console output

Executing tasks: [:app:assembleDebug]
.....
Can't find a DexGuard license file.
You should place your license file dexguard-license.txt
1) in a location defined by the Java system property 'dexguard.license',
2) in a location defined by the OS environment variable 'DEXGUARD_LICENSE',
3) in your home directory, 
4) in the class path, or
5) in the same directory as the DexGuard jar.

      

+3


source to share


3 answers


The license file is available for download after logging in at Account> files page at https://www.guardsquare.com



See this screenshot

+1


source


It has been a while since there is an updated answer, so I decided to update it as there was a change in the DexGuard license file settings.

I just upgraded Android Studio version from 2.2.3 to 2.3 and also upgraded Gradle version from 2.14.1 to 3.3. After upgrading to Gradle version 3.3, I got the same error as documented by the OP:

Can't find a DexGuard license file.
You should place your license file dexguard-license.txt
1) in a location defined by the Java system property 'dexguard.license',
2) in a location defined by the OS environment variable 'DEXGUARD_LICENSE',
3) in your home directory, 
4) in the class path, or
5) in the same directory as the DexGuard jar.

      

The My DexGuard config worked fine using Gradle version 2.14.1 with my dexguard-license.txt file in the same directory as the DexGuard gang (suggestion # 5).

It turns out that the documentation for DexGuard states the following:

Note : When using Gradle 3.1+, the license file will no longer be found if placed in the same directory as the DexGuard plugin checkbox.



(Source: DexGuard 7.3.10 Documentation -> Quick Start -> Configure License File)

I wanted to store the license file in the same directory as the DexGuard box, so I implemented suggestion # 1. I did this by adding the following line to my gradle.properties project:

systemProp.dexguard.license=./app/libs/Dexguard_7_3_10

      

Please note that my DexGaurd jar and my dexguard-license.txt files are located in the following directory: {project folder} / app / libs / DexGuard_7_3_10 /

I went with this solution as I not only created locally but also in Jenkins CI. This solution prevents me from making any changes on the build server itself (i.e. Local environment variable, copying files to server home directory or classpath parameters). Hope this helps someone else who stumbled upon this issue and found the error message confusing.

+10


source


Copy the dexguard-license.txt file and dexguard.jar file to your home directory (: / user / ironman).

0


source







All Articles