# Mobile App instrumentation error (Android)

**URL:** <https://community.dynatrace.com/t/mobile-app-instrumentation-error-android/46464>\
**Category:** Real User Monitoring\
**Tags:** android, mobile-monitoring, gradle\
**Created:** [July 4, 2024, 11:38am UTC](https://community.dynatrace.com/t/mobile-app-instrumentation-error-android/46464 "2024-07-04T11:38:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Osiris5654](https://avatars.discourse-cdn.com/v4/letter/o/ac8455/32.png) [@Osiris5654](https://community.dynatrace.com/u/Osiris5654)\
**Post date:** [July 4, 2024, 11:38am UTC](https://community.dynatrace.com/t/mobile-app-instrumentation-error-android/46464/1 "2024-07-04T11:38:36Z")

</div>

Hi everyone.

I am following the instrumentation steps for Dynatrace Mobile App Rum and I encountered the following error.

Failed to apply plugin ‘com.dynatrace.instrumentation’.  
\> The Dynatrace Android Gradle plugin must be applied in the top-level build.gradle (or build.gradle.kts) file. If you are sure that the plugin is applied correctly, you can deactivate the build checks with the Gradle project property ‘-Pdynatrace.ignoreBuildWarning=true’.

kotlin version 1.9.

Does anyone have any comments for a solution?

Thanks.

 ![image (1).png](https://global.discourse-cdn.com/dynatrace/original/3X/6/a/6ab7048acfde24528174767f61db20de03a16a47.png)

---

<div class="post-metadata">

**Author:** ![Thomas\_Wirth1](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/thomas_wirth1/32/1776_2.png) [@Thomas\_Wirth1](https://community.dynatrace.com/u/Thomas_Wirth1)\
**Post date:** [July 4, 2024, 12:06pm UTC](https://community.dynatrace.com/t/mobile-app-instrumentation-error-android/46464/2 "2024-07-04T12:06:38Z")

</div>

Hey  
Most likely you copied the configuration script into the wrong file. There are multiple build.gradle files in an Android project. You have to copy the snippet into the top-level build.gradle file and not into the build.gradle file of your “app” module.  
Maybe an [example](https://developer.android.com/build#build-files) is more helpful than the description. The correct file is the one in line 5 → the build.gradle file in the folder “MyApp” folder, where you will find the settings.gradle file too.
