Download the file (developer.umeng.com/sdk)

After you download it, unpack it, just use this one, it’s all there

android

1. Put the two JAR packages under the Android file directory in the downloaded files

Add it to the project Android/APP/LIBS, and create a new one if there is no LIBS

2. Add jars to android/app/build gradle, note the name here to want to download the jar is consistent with the package name

3. Open androidmanifest.xml and add

4. Put these interactive Java files into the project. Here I create a new folder and put it in the same directory as mainApplication.java

⚠️ change the package name in the file to your own, three Java files to change

5. Open the MainApplication. Java

Import the file, following the Java file path you just added

Add new DplusReactPackage() to protected List getPackages

Add in the onCreate

Rnumconfigure. init(this, "create appKey ", "UMENG_CHANNEL", umconfigure. DEVICE_TYPE_PHONE,"");Copy the code

6.MainActivity.java

@ Override protected void onCreate (Bundle savedInstanceState) {/ / umeng statistical MobclickAgent setSessionContinueMillis (100); // Set the statistics scenario and send interval: super.oncreate (savedInstanceState); } @override public void onResume() {super.onresume (); MobclickAgent.onResume(this); } @override protected void onPause() {// initialize super.onpause (); MobclickAgent.onPause(this); }Copy the code

⚠ ️ introducing import com. Umeng. Analytics. MobclickAgent; If not, look for it in the.java file you downloaded