1. Integrated listening cloud in Build.gradle. buildscript { repositories { mavencentral () } dependencies { classpath Filetree (dir: ' C:\\tingyun\\plugin ', include: [' *.jar '])//Add this line in Buildscript, and replace it with your own. Listen to the compilation plugin of the Cloud SDK, not embedded in the APK. }} repositories { mavencentral ()}apply plugin: ' Android ' //Add the following 2 lines apply plugin: ' Newlens ' dependencies { Compile Filetree (dir: ' Libs ', include: [' *.jar ']) compile filetree (dir: ' C:\\tingyun\\agent ', include:[' *.jar ']) //Add this line in dependencies. The agent's jar package is embedded in the APK. 2. Follow the configuration of the cloud website, configure initialization statements, add permissions, and so on. Appendix. Listen to the Cloud plugin folder structure Tingyun-- ----Agent ----Nbs.newlens.agent-2.2.5.jar ----Plugin ---- Agent-gradle-plugin-2.2.5.jar ----Nbs.newlens.class.rewriter-2.2.5.jar
Appendix, listen to the Cloud Central warehouse address: https://repo1.maven.org/maven2/com/networkbench/newlens/agent/android/agent-gradle-plugin/2.2.4/ Agent-gradle-plugin-2.2.4.pom
Another way to listen to cloud access in Android Studio