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

This product reached the end of support date on March 31, 2021.

customized apk name with dynaTrace


I am getting this error because I have customized apk name "A problem was found with the configuration of task ':app:autoInstrumentxxxxxxDebug'. > File '/Users/Torque/mobileapp-android/app/build/outputs/apk/xxxxxx/debug/app-xxxx-xx-debug.apk' specified for property 'apkFile' does not exist." but dynaTrace using default android configuration, how to fix this


Dynatrace Pro
Dynatrace Pro

The new Dynatrace Gradle plugins (version and support custom APK file renaming. If you have a similar snippet in your build.gradle file, then it should work with the new version:

android {
applicationVariants.all { variant ->
variant.outputs.each { output ->
File dirName = output.outputFile.parentFile
String fileName =".apk", "-customName.apk")
output.outputFile = new File(dirName, fileName)

Older plugin version are not aware of the file name change, when the file name is changed after the apply statement in the build.gradle file. In this case you have to apply the plugin after the APK file renaming part for older Dynatrace Gradle plugins.


Using Gradle plugin and using same code snippet above, with DexGuard 8.0.xx still get the same apkFile error above.

This seem to work fine without applying DexGuard plugin

DexGuard is not fully supported by Dynatrace (as mentioned in the documentation). In this case you should generate a support ticket and troubleshoot the problem with the support team. It may be possible to find a workaround (depending on the features you are using).