cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to instrument on apk file

diego_cotta
Newcomer

I configured Dynatrace in my project, but when I try to compile the project I get the following error message.


Unable to instrument "{FilePath}\app.apk". See log for details.

:app:autoInstrumentDevelopDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:

Execution failed for task ':app:autoInstrumentDevelopDebug'.

> auto-instrumentation failed

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.


* Exception is:

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:autoInstrumentDevelopDebug'.


1 REPLY 1

Thomas_Wirth1
Dynatrace Champion
Dynatrace Champion

Does your JAVA_HOME environment variable point to a JDK 1.8?

To find out the reason for the build cancellation, you have to look at the auto-instrumentor logs. Enable the debug logging with the property DTXLogLevel:

dynatrace {
defaultConfig {
applicationId '<YourApplicationID>'
environmentId '<YourEnvironmentID>'
cluster '<ProvidedClusterUrl>'
agentProperties 'DTXLogLevel': 'debug'
}
}

When the Android build process is triggered via the Run button from Android Studio, the console logs are displayed in the "Gradle Console" view or "Build" view (depends on your Android Studio version). The log file is stored in the "<project>/<module>/build/tmp/autoInstrument<build_variant>/logs" directory.


Featured Posts