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

Flutter Dynatrace plugin fails to build


I am trying to instrument our flutter app with the provided instructions

Pub spec yaml contains



    sdk: flutter
  dynatrace_flutter_plugin: ^3.277.1



The dynatrace config file is located in the main folder as requested, but the Android project breaks with



FAILURE: Build failed with an exception.

* What went wrong:
Dynatrace Android Gradle plugin version and OneAgent version are not compatible



I have tried running the command requested on a windows as well as a mac device



dart run dynatrace_flutter_plugin



This does not fix the problem. 

I have also tried running flutter clean, deleting gradle caches, etc but to no avail. 
There is no way to set the OneAgent version from what I can tell in the Android project or the flutter project. Where would this be located? Is there something else I can try?


Dynatrace Champion
Dynatrace Champion

Hi Mgeldenhuys,
The Dynatrace Flutter plugin internally uses the Dynatrace Android Gradle plugin to instrument the native part of the application. This plugin will automatically add a dependency to "OneAgent for Android" artifact with the correct version number.
OneAgent version was not specified by the plugin. It was added manually or was added as transitive dependency of another artifact. You have to check the dependency tree to determine which module is responsible.
When different versions are used, Gradle will resolve this dependency conflict. In your case, the default resolution for the version conflict should be and not Without additional information, we can't determine the root cause for this behavior.
I suggest to open a support ticket and provide the Gradle build files. The support team will help you troubleshooting the problem.

Featured Posts