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

gradle plugin installation error


hello. i am trying to monitor a mobile application. this mobile application is as simple as a hello world application. the app was built by android studio. 

in dynatrace environment i've created a mobile application. i've follow the steps inside instrumentation wizard > android > kotlin.

but build.gradle.kts file gives me error. it says: "Failed to apply plugin 'com.dynatrace.instrumentation.module'.
> The Dynatrace Android Gradle Plugin can only be applied to Android application or dynamic-feature modules"

here is a screenshot:


anybody who have an idea how to achieve my goal? i dont really know what the problem is. because as i said, i followed the steps in instrumentation wizard > android > kotlin page says.


Dynatrace Champion
Dynatrace Champion

Hey kasdev,
The Dyntrace Android Gradle plugin artifact contains two plugins. The instrumentation wizard (and the setup steps in the documentation) describe how you can use the main plugin (it has the plugin id "com.dynatrace.instrumentation"). In your screenshot, you are using the plugin id from the second plugin. This "module-based" plugin works slightly different and should be used, when the main plugin can't be used.

I would recommend so change line 11 in your build script and replace the plugin id "com.dynatrace.instrumentation.module" with "com.dynatrace.instrumentation" (without ".module"). The main plugin should be able to correctly identify your modules and configure them correctly.

I double checked the Kotlin DSL snippet in the instrumentation wizard and it contains the recommended snippet with plugin "com.dynatrace.instrumentation". I assume that the plugin id was changed after the snippet was copied from the wizard.

wow.. you solved my problem 🙂 i had already given up after almost 20hours of work but after i've seen your comment it took 1 hour to accomplish it 🙂 i just really thank you. 

Featured Posts