Instrumentation Appears to Be Running After Being Disabled
If you disabled the instrumentation in Android using the Gradle flag enabledForDebugBuilds, but the instrumentation task still runs, this is because of the Transform API.
Android Gradle Plugin 1.5.0 introduced the Transform API that the Android Agent uses to do the bytecode injection. Due to the limitations of the Transform API, even when instrumentation is disabled, the transformClassesWithAppDynamicsForDebug task will still appear in the Gradle task log. To ensure that it is not actually instrumenting, run gradle with --info flag to show the info logs.
You should see the following log:
Instrumentation is disabled for this build variant. Just copying the input files to fulfill Transform contract.