Install the Android Agent

Use the native package system to install the Android Agent. In the app module build.gradle, add the class path of the Splunk AppDynamics Gradle Plugin to the build path dependencies clause. For classpath 'com.appdynamics:appdynamics-gradle-plugin:' use the latest Android Agent version from the Splunk AppDynamics Downloads Portal. However, you can use an older version of the Splunk AppDynamics plugin for compatibility between your Gradle and Android Tools or for other reasons.

Note: If you are unable to use the Android Gradle plugin 3.4.1 or higher, you will have to use the Android Agent 20.4.0 or an earlier version.
buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.1.0'
        classpath 'com.android.tools.build:gradle:3.4.1' // 3.4.1 or higher
        classpath 'com.appdynamics:appdynamics-gradle-plugin:<android-agent-version>' // Set to your Android Agent version.
    }
}
allprojects {
    repositories {
        mavenCentral()
    }
}