Real User Monitoring
User session monitoring, key user actions - everything RUM.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

npx instrumentdynatrace gradle=android/build.gradle.kts fails

Aman-Shaikh
Newcomer

Hello there,

I have react native app with android folder having build.gradle.kts when I do npx instrumentdynatrace gradle=android/build.gradle.kts it fails to set up android side of the project and give error .gradle file not found even though it is there.

AmanShaikh_0-1776125887479.png

 

2 REPLIES 2

t_pawlak
Leader

Hi, 
build.gradle.kts itself should be supported. Android Gradle plugin supports Kotlin DSL and must be applied in the top-level Android build file, either build.gradle or build.gradle.kts.
Here documentation:
Dynatrace Android Gradle plugin 
But For React Native,in documentation you can see this:

npx instrumentDynatrace

from the project root and let it apply the configuration from dynatrace.config.js, instead of passing the Gradle file manually.

So this looks more like a limitation or bug in the instrumentDynatrace CLI when using the explicit gradle=android/build.gradle.kts argument, rather than lack of .kts support in Dynatrace itself. I’d recommend:

  • making sure android/build.gradle.kts is the top-level Android build file
  • running npx instrumentDynatrace without the manual gradle=... argument
  • and if it still fails, opening a Dynatrace support case because the docs say build.gradle.kts is supported

Instrument mobile apps with Dynatrace React Native plugin 

AndreiEKB
Dynatracer
Dynatracer

The issue is resolved, please expect it in the version 2.337.1

Featured Posts