This article lists common issues you may encounter when you configure the PreEmptive Protection™ DashO™ Gradle Plugin for Android, with their causes and resolutions. For issues in DashO itself, see the Troubleshooting FAQ.
Verify That the Plugin Is Available
- Run
gradlew tasks. - Check that a
dashOPluginVersiontask appears in the Help tasks section. If it does, you appliedcom.preemptive.dasho.androidcorrectly.
DashO Home Issues
DashO x.y or later not found. Please set the DASHO_HOME property, or set 'home' or 'searchVersion' in the 'dasho' closure in your buildscript.
Cause: DashO Home isn't specified, or the installed DashO versions are incompatible with this plugin version.
Resolution: Specify DashO Home in one of the ways described in Configure DashO Home.
Specified DashO Home '[file path]' is not valid
Cause: The directory doesn't contain the required files.
Resolution: Make sure the directory contains DashOPro.jar. With plugin version 1.1.x, it must also contain Encrypter.jar.
DashO version 'x.y' was not found. Could not find {some jar}. Please use a different version or set DashO Home.
Cause: When the plugin searches for the specified DashO version, it found an installation without the expected JAR file. For example, version 10.1 doesn't contain the required Encrypter.jar.
Resolution: Set searchVersion to a supported DashO version, or configure the DashO Home location directly.
Option --pathMap not understood
Cause: Your DashO version isn't compatible with the DashO Gradle Plugin for Android.
Resolution: Use DashO 10.x or later. For more information, see Version Compatibility.
Configuration Issues
Could not get unknown property {some property} for object of type com.preemptive.dasho.gradle.DashOExtension.
Cause: The property is misspelled, or you set javaOptions, libraryAssetDirs, or libraryResourceDirs with an equals sign, such as javaOptions = "-Xmx512m".
Resolution: Check the spelling, and don't use = with these properties. For example, write javaOptions "-Xmx512m".
Error: Could not find method libraryAssetDirs() (or libraryResourceDirs()) for arguments...
Cause: You set libraryAssetDirs or libraryResourceDirs with plugin version 1.1 or earlier. These options were added in version 1.2.
Resolution: Upgrade the plugin to version 1.2 or later.
Error: You must use an Android Mode configuration file with the DashO Gradle Plugin for Android.
Cause: Your DashO project file isn't configured for Android Mode.
Resolution: Migrate the project file to Android Mode.
Changes were not applied. {Some Reason}
Cause: You used Apply Changes with DashO enabled for debug builds. The reason may be JVMTI error: JVMTI_ERROR_UNMODIFIABLE_CLASS or Adding classes requires an app restart. Apply Changes isn't compatible with the changes DashO makes.
Resolution: Run a complete build instead of using Apply Changes.
Exclude pattern '{pattern}' did not match any inputs: {list of names}
Cause: The pattern doesn't match any input passed to the DashO transform. If other transforms run before DashO, they may change the input names. For more information, see Exclude Inputs from Protection.
Resolution: Compare the pattern with the list of names under the error message, and fix the pattern.
Warning: ProGuard appears to be enabled instead of R8.
Cause: ProGuard runs instead of R8 if you use an Android Gradle Plugin version earlier than 3.4.0 without enabling R8, or if you set android.enableR8=false in gradle.properties. ProGuard may not handle classes DashO processed correctly, and can fail with fatal errors.
Resolution: Set android.enableR8=true in your gradle.properties file. For more information, See Enable R8.
Warning: PreEmptive strongly recommends R8 rather than ProGuard with the DashO Gradle Plugin for Android.
Warning: minifyEnabled is false for build type "[current build type]".
Cause: minifyEnabled isn't true for the build type of a variant DashO protects, so R8 doesn't process the classes DashO protected. Running R8 with DashO is essential for full protection of your application or library.
Resolution: Set minifyEnabled to true for the build type. For more information, see Enable R8.
A problem occurred configuring project {some name}. {Maybe some additional information}
Cause: If the additional information is ASCII, you're using plugin version 1.1.x or later with Android Gradle Plugin 3.2.x.
Resolution: Use a supported Android Gradle Plugin version.
Build Task Failures
Execution failed for task ':transformClassesWithInstantRunForDebug'
Cause: You built in Android Studio with DashO enabled for debug builds, and Instant Run enabled.
Resolution: Change the variants DashO protects, or disable Instant Run.
Execution failed for task ':minifyReleaseWithR8'
Cause: R8 had an issue processing the classes. One known issue: R8 throws a NullPointerException while it processes kotlinx.coroutines.internal.MainDispatcherLoader.loadMainDispatcher().
Resolution: Run the Gradle build with --debug or --stacktrace for details. For the known issue, exclude that method from Control Flow, or exclude kotlinx-coroutines from DashO entirely.
Runtime Failures
Kotlin Coroutines Exceptions
Cause: R8 isn't configured for Kotlin coroutines. You may see java.lang.NoSuchFieldException: No field inFlightTasks or java.lang.IllegalStateException: Module with the Main dispatcher is missing.
Resolution: Configure R8 for Kotlin coroutines.
java.lang.RuntimeException: Internal error in Cloud Firestore {version}
Cause: One known cause relates to String Encryption and reflection.
Resolution: Exclude the problem code from String Encryption. These methods are known to cause this error in Firebase 22.1.1:
io.grpc.LoadBalancerRegistry:getHardCodedClasses()io.grpc.ManagedChannelProvider$HardcodedClasses:iterator()io.grpc.NameResolverRegistry:getHardCodedClasses()
Diagnostic Tools
Temporarily Disable the DashO Integration
To run a build without DashO processing, use the DISABLE_DASHO property when you run gradlew.
Show the Parameters Passed to DashO
To see all the parameters passed to DashO, use the SHOW_DASHO_CMD property when you run gradlew. You can also set the debug property.
Review DashO's Logs
DashO writes its output to the console, and also to build/outputs/logs/dasho-{variantName}-log.txt.
Build Performance Issues
See An Android Mode Build Takes Longer Than Expected.