Troubleshooting
- Verifying the plugin is available
- Error: Unexpected char '\' ... flatDir dirs: {The Path to the DashO Installation}
- Error: Could not find method dashOConfig() for arguments...
- Error: Plugin with id 'com.preemptive.dasho*' not found.
- Error: Could not find any version that matches com.preemptive:dasho:X.Y+.
- Error: Could not set unknown property 'maxHeap' for object of type com.preemptive.dasho.gradle.DashOExtension
- Error: Could not set unknown property 'transformName' for object of type com.preemptive.dasho.gradle.DashOExtension
- Error: Could not set unknown property 'skipManifestProcessing' for object of type com.preemptive.dasho.gradle.DashOExtension
- Error: Could not set unknown property 'verbose' for object of type com.preemptive.dasho.gradle.DashOExtension
- Error: Could not set unknown property 'disabledForBuildVariants' of type com.preemptive.dasho.gradle.DashOExtension
- Error: Could not set unknown property 'generateProGuardMap' for object of type com.preemptive.dasho.gradle.DashOExtension
- Error: Could not create plugin of type 'AppPlugin' (or 'LibraryPlugin').
- Error: Failed to notify project evaluation listener.
- Error: unable to resolve class com.android.build.OutputFile (or some other com.android... class)
- Error: A problem occurred evaluating [root] project ...
- Verifying the configuration is correct
- Error: File '{project path}/project.dox' specified for property 'doxFile' does not exist.
- Error: DashOHome is not configured.
- Error: tried to access method org.gradle.api.tasks.JavaExec.exec()V...
- Error: Cannot find "some.aar" in: ...
- Errors during protection
- Error: java.lang.OutOfMemory: Java heap space or java.lang.OutOfMemory: GC overhead limit exceeded
- Error: Option --properties not understood.
- Gradle issues after protection
- Temporarily Disabling DashO Integration
- Troubleshooting Parameters
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.
If you encounter an error, first double-check the versions being used. See Version Compatibility.
Here are some common errors and solutions:
Error: Unexpected char '\' ... flatDir dirs: {The Path to the DashO Installation}
Make sure you use forward slashes ('/') when specifying the path.
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 '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
anddisabledForBuildVariants
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.
Error: Could not create plugin of type 'AppPlugin' (or 'LibraryPlugin').
Make sure you are using compatible versions of the Android and DashO plugins. See Version Compatibility.
Error: Failed to notify project evaluation listener.
Make sure you are using compatible versions of the Android and DashO plugins. See Version Compatibility.
Error: unable to resolve class com.android.build.OutputFile (or some other com.android... class)
Make sure you are using compatible versions of the Android and DashO plugins. See Version Compatibility.
Error: A problem occurred evaluating [root] project ...
Make sure you are using compatible versions of the Android and DashO plugins. See Version Compatibility.
Verifying the configuration is correct
Run gradlew build
If you applied and configured the plugin correctly, DashO will protect your code.
If you encounter an error, here are some common errors and solutions:
Error: File '{project path}/project.dox' specified for property 'doxFile' does not exist.
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 thebuild.gradle
of the other projects until you have configured them to use DashO. - v3.1+: Make sure
minifyEnabled
is set tofalse
inside thebuild.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.
Error: tried to access method org.gradle.api.tasks.JavaExec.exec()V...
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: java.lang.OutOfMemory: Java heap space or java.lang.OutOfMemory: GC overhead limit exceeded
Increase (or set) the maxHeap (see the configuration section). If you are using a version earlier than 1.7 try the following:
Add a new task to the gradle build script. Make sure you define it with the proper task name(s) you see when running
gradlew tasks
.task setMaxMem { doLast { project.tasks['obfuscateDebug'].maxHeapSize=536870912 //bytes project.tasks['obfuscateRelease'].maxHeapSize=536870912 //bytes } }
Call it manually before your build task (e.g.
gradlew setMaxMem build
)
Error: Option --properties not understood.
Make sure you are using version 8.1.0 (or later) of DashO.
Gradle issues after protection
Some errors can occur from misconfiguration of the project .dox
file.
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 thecom.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.
Note: This is only supported in versions 1.7 and later.