Gradle Plugin for Android Troubleshooting
These are some common issues that you may encounter when configuring the DashO™ Gradle Plugin for Android. PreEmptive Protection™ DashO for Android & Java has its own troubleshooting section here.
- Verifying the plugin is available
- DashO Home Issues
- DashO not found. Please set the DASHO_HOME property, or set 'home' or 'searchVersion' in the 'dasho' closure in your buildscript.
- Specified DashO Home '[file path]' is not valid
- Option --pathMap not understood
- Other Configuration Issues
- Could not get unknown property 'javaOptions' for object of type com.preemptive.dasho.gradle.DashOExtension.
- Error: You must use an Android Mode configuration file with the DashO Gradle Plugin for Android.
- Execution failed for task ':transformClassesWithInstantRunForDebug'
- Exclude pattern '{pattern}' did not match any inputs: {list of names}
- Warning: ProGuard appears to be enabled instead of R8.
- Warning: minifyEnabled is false for build type "[current build type]".
- Temporarily Disabling DashO Integration
- Troubleshooting Parameters
- Reviewing DashO's Logs
- Build Performance Issues
Verifying the plugin is available
You can verify the plugin is installed correctly by running gradlew tasks
.
If you properly applied the com.preemptive.dasho.android
plugin, you should see a dashOPluginVersion
task listed under the Help tasks
section.
DashO Home Issues
DashO not found. Please set the DASHO_HOME property, or set 'home' or 'searchVersion' in the 'dasho' closure in your buildscript.
DashO Home was not specified using any of the ways described in Configuring DashO Home.
Specified DashO Home '[file path]' is not valid
Make sure that the directory that you specified contains the DashOPro.jar
file.
Option --pathMap not understood
You are using a version of DashO that is not compatible with the DashO Gradle Plugin for Android. The plugin is compatible with DashO 10.0 and later.
Other Configuration Issues
Could not get unknown property 'javaOptions' for object of type com.preemptive.dasho.gradle.DashOExtension.
This can occur if you try to set javaOptions
using an equals sign (e.g. javaOptions = "-Xmx512m"
).
Do not use the =
(e.g. javaOptions "-Xmx512m"
).
Error: You must use an Android Mode configuration file with the DashO Gradle Plugin for Android.
The DashO configuration (.dox) file that you are using with DashO is not configured for Android Mode and needs to be migrated.
Execution failed for task ':transformClassesWithInstantRunForDebug'
You will get this error when you build in Android Studio if you have enabled DashO for debug builds and have not disabled Instant Run. Either change the variants for which DashO is enabled, or disable Instant Run.
Exclude pattern '{pattern}' did not match any inputs: {list of names}
The pattern provided did not match any of the inputs provided to the DashO transform. Double-check the pattern against the list of names below the error message. As mentioned in Excluding from Protection, if other transforms run before the DashO transform the names may be corrupted.
Warning: ProGuard appears to be enabled instead of R8.
You will receive this warning if ProGuard appears to be enabled instead of R8. ProGuard may not correctly handle classes processed by DashO, and could issue fatal errors when attempting to process them. We strongly recommend using R8 rather than ProGuard with the DashO Gradle Plugin for Android.
ProGuard will run instead of R8 if you are using a version of the Android Gradle Plugin prior to 3.4.0 without manually enabling R8.
ProGuard will also run if you have disabled R8 by setting android.enableR8=false
in your gradle.properties
file.
You can enable R8 by setting android.enableR8=true
in your gradle.properties
file.
See Enabling R8 for details.
Warning: minifyEnabled is false for build type "[current build type]".
You will receive this warning if minifyEnabled
is not set to true
for the build type of a variant on which DashO is running.
This means that R8 will not process the classes protected by DashO.
Running R8 alongside DashO is essential for full protection of your application or library when using the DashO Gradle Plugin for Android.
See Enabling R8 for details.
Temporarily Disabling DashO Integration
If you would like to run a build without DashO processing the files, use the DISABLE_DASHO
property when you run gradlew
.
Troubleshooting Parameters
If you would like to see all the parameters passed to DashO, use the SHOW_DASHO_CMD
property when you run gradlew
.
You can also configure the debug option.
Reviewing DashO's Logs
The output from DashO will go to the console automatically.
It is also captured in a log file located at build/outputs/logs/dasho-{variantName}-log.txt
.