With a build.gradle like this (simplified):
buildscript {
...
dependencies {
classpath "com.android.tools.build:gradle:7.3.1"
classpath "com.huawei.agconnect:agcp:1.7.3.302"
}
}
Module build.gradle (merely alike the Enabling APM tutorial):
plugins {
id "com.android.application"
id "com.huawei.agconnect"
}
agcp {
enableAPMS true
}
dependencies {
implementation "com.huawei.hms:base:6.7.0.300"
implementation "com.huawei.agconnect:agconnect-core:1.7.3.302"
implementation "com.huawei.agconnect:agconnect-apms:1.6.1.303"
}
I get this warning:
--W- [
APMSClassVisitor]agconnect-apmsversion [1.6.1.303] is not same withagconnect-apms-pluginversion [1.5.2.310], please update one of them, or invalidate AndroidStudio cache if these versions have been same.
Followed by further problems:
[Instrument] an error occurred while instrumenting an unknown class, skipping it: Module requires ASM6
[Instrument] an error occurred while instrumenting an unknown class, skipping it: NestHost requires ASM7
[Instrument] an error occurred while instrumenting an unknown class, skipping it: NestMember requires ASM7
How to upgrade the (bundled) agconnect-apms-plugin version to 1.6.1.303?
To make the versions match, one has to add
agconnect-apms-pluginversion1.6.1.300:And disable the integrated
agconnect-apms-plugin1.5.2.310, which is otherwise being preferred:Note:
enableAPMSfalseis the default value;trueis what caused the version conflict.