π¨πΌβπ» HMS Build Gradle Solution for Latest Android Studio Versions
Introduction
We were trying to implement HMS Core SDK to our project and we faced an issue about gradle implementation for Android Studio versions Bumblebee and Chipmunk. In this article, we will explain you to gradle implementation of HMS Core for the latest Android Studio versions. So we wish this article to help you to resolve gradle implementation issues.
Integration Process
a) Open the build.gradle file in the root directory of your Android Studio project.
- In new Android Studio Versions (like Chipmunk) there is no buildscript > dependencies in project-level build gradle file. So your project-level build gradle files should look like this:
- Now letβs add buildscript > dependencies if there is no buildscript in your gradle file.
- Your final project-level build gradle file should look like this:
b) Open the project-level settings.gradle file and configure the Maven repository address for the HMS Core SDK.
c) Open the app-level build.gradle file of your project.
- Add the plugin configuration in the plugins block.
Thatβs all π
Conclusion
The article explained about HMS Kit gradle integration in latest Android Studio Versions like Chipmunk. The main purpose of this article is to resolve gradle implementation issues because some articles are too old and not compatible with the latest versions. If you want to create a project and app in AppGallery Connect and more you can check out this codelab and follow the integration preparations.
We hope, you found this article helpful and if you have any comments or questions, please let us know in the comments below.
References
- https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/android-integrating-sdk-0000001050040084
- https://developer.huawei.com/consumer/en/codelab/HMSPreparation/index.html#0
We prepared this article with Emine Δ°NAN. You can also check out her profile :))