Android以aar包形式引入hunter-timing,Java(4)
(1)参照这篇文章:
生成.aar文件。
(2)把第(1)阶段生成的hunter-timing-library-debug.aar包文件(如果不好找到,在项目中搜索.aar)放到当前项目的 libs 目录下。
(3)配置工程级别的build.gradle:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'cn.quinnchen.hunter:hunter-timing-plugin:1.2.3'
classpath 'cn.quinnchen.hunter:hunter-transform:1.2.3'
}
}
plugins {
id 'com.android.application' version '7.4.2' apply false
id 'com.android.library' version '7.4.2' apply false
}
(4)配置app模块的build.gradle:
plugins {
id 'com.android.application'
id 'hunter-timing'
}
android {
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar","*.aar"])
}
(5)完成配置后,参照这篇文章:
即可写上层Java代码。