31 Oct 2023 09:00 AM
I am trying to instrument our flutter app with the provided instructions
Pub spec yaml contains
dependencies:
flutter:
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 8.277.1.1003 and OneAgent version 8.223.1.1003 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?
Solved! Go to Solution.
31 Oct 2023 01:26 PM
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 8.223.1.1003 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 8.277.1.1003 and not 8.223.1.1003. 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.