Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Add the dependency
implementation 'com.github.davistsin:aliyun-webtracking-android:{last version}'
Logger.init(this, "your project name", "cn-shenzhen", "Your logstore name",
new LoggerConfig.Builder()
.enablePrint(true)
.setOfflineMode(true)
.setMaxOfflineNum(100)
.build()
);
JSONObject object = new JSONObject();
object.put("test", "123456789000");
Logger.put(object.toString());
Logger.log("TAG", "上报一个错误");
Logger.setAppInfo("appName", BuildConfig.VERSION_NAME, BuildConfig.VERSION_CODE);