Version Incompatibility

Many errors occur because of a mismatch between the Android Gradle Plugin and DashO Gradle Plugin.
Make sure you are using compatible versions of the Android and DashO plugins.
See Version Compatibility if you encounter errors like:

Could not create plugin of type 'AppPlugin' (or 'LibraryPlugin').

Failed to notify project evaluation listener.

A problem occurred evaluating [root] project ...

Unable to resolve class com.android.build.OutputFile (or some other com.android... class).

Unable to find method 'com.android.build.gradle.internal.ApplicationTaskManager: method ... (or some other method in a com.android... class).

Verifying the plugin is available

Run gradlew tasks

If you applied the com.preemptive.dasho or com.preemptive.dashoJar plugin, you should see tasks like obfuscate or obfuscateJar listed in the build section.

If you applied the com.android.application or com.android.library plugin the tasks differ based on the version of the plugin you are using. If you are using the 1.7 (or earlier) plugin, you should see tasks like obfuscate[Flavor]Release or obfuscate[Flavor]LibraryRelease listed in the build section. If you are using the 1.8 (or later) plugin, you should see a dashOPluginVersion task listed in the other section.

If you do not encounter an error and do not see one of those tasks listed, make sure you have applied the plugin in your script.

Error: Could not find method dashOConfig() for arguments...

Make sure you apply one of the plugins: com.preemptive.dasho, com.preemptive.dashoJar, com.android.application, com.android.library, or com.preemptive.dashoCustom. If you applied com.android.application or com.android.library double check the order of the dependencies. Also make sure that dashOConfig is not inside any other closure.

Error: Plugin with id 'com.preemptive.dasho*' not found.

Make sure you have referenced the plugin in the dependencies closure.

Error: Could not find any version that matches com.preemptive:dasho:X.Y+.

Make sure you have referenced the directory containing the dasho-x.y.z jar file in the repositories closure.

Error: Could not set unknown property 'maxHeap' for object of type com.preemptive.dasho.gradle.DashOExtension

Make sure you are using version 1.7.0 (or later) of the DashO Gradle Plugin.

Error: Could not set unknown property 'transformName' for object of type com.preemptive.dasho.gradle.DashOExtension

Make sure you are using version 2.2.1 (or later) of the DashO Gradle Plugin.

Error: Could not set unknown property 'skipManifestProcessing' for object of type com.preemptive.dasho.gradle.DashOExtension

Make sure you are using version 2.3.1 (or later) of the DashO Gradle Plugin.

Error: Could not set unknown property 'verbose' for object of type com.preemptive.dasho.gradle.DashOExtension

Make sure you are using version 2.3.4 (or later) of the DashO Gradle Plugin.

Error: Could not set unknown property 'debug' for object of type com.preemptive.dasho.gradle.DashOExtension

Make sure you are using version 3.2.0 (or later) of the DashO Gradle Plugin.

Error: Could not set unknown property 'disabledForBuildVariants' of type com.preemptive.dasho.gradle.DashOExtension

The disabledForBuildVariants configuration property was introduced in 3.0.2 to replace the disabledforBuildTypes
configuration property. Make sure you are using version 3.0.2 (or later) of the DashO Gradle Plugin
or, if you are using an older version, use the disabledForBuildTypes property.

Note: Both disabledForBuildTypes and disabledForBuildVariants are no longer supported in v3.1.0.
See the Enabling Protection section for more details.

Error: Could not set unknown property 'generateProGuardMap' for object of type com.preemptive.dasho.gradle.DashOExtension

Make sure you are using version 3.0.3 (or later) of the DashO Gradle Plugin.

Verifying the configuration is correct

Run gradlew build

If you applied and configured the plugin correctly, DashO will protect your code.

Solution 1: Make sure you have specified the doxFilename in the dashOConfig closure. By default, it looks for project.dox or a name based on the flavor of an Android build.

Solution 2: You are using DashO's com.android.application or com.android.library plugin and have other Android projects which are compiled in the same Gradle build which are not yet configured to use DashO.

Prior to v3.1.0: Add dashOConfig {disabledForBuildTypes=['debug', 'release']} inside the build.gradle of the other projects until you have configured them to use DashO.

v3.1+: Make sure minifyEnabled is set to false inside the build.gradle of the other projects until you have configured them to use DashO.

Error: DashOHome is not configured.

Make sure you either specify the dashOHome in the dashOConfig closure or in the DASHO_HOME environment variable.

You are using an old version of Gradle, please upgrade to a later version.

Error: Cannot find "some.aar" in: ...

Make sure you spelled the filename correctly in includeAsInputs or dexExcluded. If this is an Android project, you can try to specify the exact group:name:version instead of name.aar. If any of the paths listed contain build-cache you may need to disable caching.

Errors during protection

If an error occurs while DashO is running, the information should be listed in the output.
Double check that you used ${gradleInput} and ${gradleOutput} in your DashO configuration.

Error: Option --properties not understood.

Gradle issues after protection

Error: {BUILD_DIR}\manifests\debug\..\dasho-debug\AndroidManifest.xml: error: Unable to open file for read: No such file or directory.

Solution 1: Make sure you have specified ${AndroidManifestFile} and ${AndroidManifestOutput} in the Non-Class Files section of the .dox file.

Solution 2: Make sure you are using DashO version 7.5 (or later).

Issue: I am using the com.preemptive.dasho plugin and there are no classes in the jar file created by Gradle.

Make sure you have used ${gradleOutput} as the output location the .dox file (and that it is a merged directory).

Issue: I am using the com.preemptive.dashoJar plugin and do not see the obfuscated_libs directory in my build folder.

Make sure you have used ${gradleOutput} as the output location the .dox file (and that it is a jar file).

Temporarily Disabling DashO Integration

If you would like to run a build without the tasks added by DashO, you can disable them by adding -DDISABLE_DASHO to the command line when you run gradlew.

Note: The DISABLE_DASHO setting will have no impact if you are using the com.preemptive.dashoCustom plugin as it does not add any tasks.

Troubleshooting Parameters

If you would like to see all the parameters passed to DashO, add -DSHOW_DASHO_CMD to the command line when you run gradlew. This will print out the contents of the .properties file passed to DashO and show the full command line used to run DashO.