πŸ‘¨πŸΌβ€πŸ’» HMS Build Gradle Solution for Latest Android Studio Versions

ibrahimertanylmz
Huawei Developers
Published in
2 min readSep 23, 2022

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.

Project level build gradle file
  • 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:
project-level build gradle
  • Now let’s add buildscript > dependencies if there is no buildscript in your gradle file.
project-level build gradle
  • Your final project-level build gradle file should look like this:
project-level build gradle

b) Open the project-level settings.gradle file and configure the Maven repository address for the HMS Core SDK.

settings gradle

c) Open the app-level build.gradle file of your project.

App level build gradle file
  • Add the plugin configuration in the plugins block.
app level build gradle

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

We prepared this article with Emine Δ°NAN. You can also check out her profile :))

--

--

ibrahimertanylmz
Huawei Developers

Android Developer @Huawei πŸ’», ESOGU Computer Engineering Graduate πŸŽ“, Proactive Self-Starter, Quick Learner, Team Player πŸ‘¨β€πŸ‘¦β€πŸ‘¦