|
|
|
|
|
|
} |
|
|
|
``` |
|
|
|
|
|
|
|
2. Add the APM plug-in to the baseProjectTemplate.gradle file. |
|
|
|
|
|
|
|
``` |
|
|
|
buildscript { |
|
|
|
repositories { |
|
|
|
// Add the maven repository |
|
|
|
maven { url 'https://developer.huawei.com/repo/' } |
|
|
|
} |
|
|
|
dependencies { |
|
|
|
// ... |
|
|
|
// To benefit from the latest APM feaures, update your Android Gradle Plugin dependency to at least v3.3.2 |
|
|
|
classpath 'com.android.tools.build:gradle:3.3.2' |
|
|
|
// Add the dependency for the APM plugin |
|
|
|
classpath 'com.huawei.agconnect:agconnect-apms-plugin:1.5.2.300' |
|
|
|
} |
|
|
|
} |
|
|
|
``` |
|
|
|
|
|
|
|
### Step 4: Integrating the APM Game SDK (Optional) |
|
|
|
Add the APM SDK dependency to `launcherTemplate.gradle` in `/Assets/Plugins/Android/` |
|
|
|
file (usually in the app directory). |
|
|
|
|
|
|
// Add APM SDK library dependency |
|
|
|
implementation 'com.huawei.agconnect:agconnect-apms:1.5.2.300' |
|
|
|
implementation 'com.huawei.agconnect:agconnect-apms-game:1.5.2.303' |
|
|
|
} |
|
|
|
``` |
|
|
|
|
|
|
|
Add the APM plug-in to the baseProjectTemplate.gradle file. |
|
|
|
|
|
|
|
``` |
|
|
|
buildscript { |
|
|
|
repositories { |
|
|
|
// Add the maven repository |
|
|
|
maven { url 'https://developer.huawei.com/repo/' } |
|
|
|
} |
|
|
|
dependencies { |
|
|
|
// ... |
|
|
|
// To benefit from the latest APM feaures, update your Android Gradle Plugin dependency to at least v3.3.2 |
|
|
|
classpath 'com.android.tools.build:gradle:3.3.2' |
|
|
|
// Add the dependency for the APM plugin |
|
|
|
classpath 'com.huawei.agconnect:agconnect-apms-plugin:1.5.2.300' |
|
|
|
} |
|
|
|
} |
|
|
|
``` |
|
|
|
|
|
|
|