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

Error when adding Dynatrace plugin into gradle file in Unity

lhchi
Newcomer

Hello everyone, I'm using Unity version 2020.3.30f1 and I want to add Dynatrace plugin into my project

I was refer the following document for adding: 

Screenshot_1.png

and my gradle file before and after added:

Before

Screenshot_2.png

After

Screenshot_3.png

 

I can build normally with default .gradle file but had been some error with the new gradle file

Someone can help me for this issue or any way to add Dynatrace plugin in Unity? Thanks.

2 REPLIES 2

techean
Dynatrace Champion
Dynatrace Champion

The documentation you are referring is not for Unity or iOS but more for android. 

Try using this 3rd party plugin nativescript-dynatrace-gradle-plugin | NativeScript Marketplace

Or reach out to your CSM via support to help with iOS application instrumentation using cocoapods. 

KG

Thomas_Wirth1
Dynatrace Champion
Dynatrace Champion

Hey lhchi,
The Dynatrace Android Gradle plugin is used to instrument "native" Android apps. It instruments UI components from the Android SDK. I'm not familiar with Unity and therefore I can't determine which parts of an Unity app can be monitored by the Dynatrace Android Gradle plugin. Our assumption is that Dynatrace will not monitor user interactions, because the Unity app doesn't use the standard Android UI components.

Android Gradle plugin version 3.6.0:

Please read the following paragraph from the official documentation: https://www.dynatrace.com/support/help/how-to-use-dynatrace/real-user-monitoring/setup-and-configura...

 

Starting with OneAgent SDK for Android version 8.245, we're ending support for the following versions of Android and Gradle plugin:
    Android 4.0.3 - 4.4 (API level 15 - 19)
    Android Gradle plugin 3.1 - 3.6.
After the release, we'll support the following versions:
    Android 5.0+ (API level 21+)
    Android Gradle plugin 4.0+

 

You have to either upgrade the used Android Gradle plugin version or use an old Dynatrace Android Gradle plugin version.

Plugin id "com.android.library":
The Dynatrace Android Gradle plugin only instruments Android app projects. But the shared build.gradle file is used for building an Android library.
I found this page  but it does not exist for version 2020.3. Based on the specification on this page you would have to add the Dynatrace plugin configuration to the file root/build.gradle and then it should automatically detect the Android app module in the location root/launcher/build.gradle

 

Build errors:
Can you share the build error message? Without it, we are not able to determine the problem.

 

Featured Posts