If you are using Eclipse, you can download the HMS Core SDK and integrate it into your Eclipse project.
For details, please refer to Eclipse SDK Download.

The projects to be imported must be located in the same drive as your workspace, for example, D:\. If they are not in the same drive, select Copy projects into workspace to copy the projects to the workspace.



<application>
<provider
android:name="com.huawei.agconnect.core.provider.AGConnectInitializeProvider"
android:authorities="${applicationId}.AGCInitializeProvider"
android:exported="false" />
<service
android:name="com.huawei.agconnect.core.ServiceDiscovery"
android:exported="false" />
</application> Copy the resource files in the assets directory of the HMSSdkStats project to the assets directory of your project.
If any other kits are involved, also copy their resource files to your project directory.

Open the project.properties file in your project directory, and add the following code to merge the Manifest files in the subprojects:
manifestmerger.enabled=true
The ADT version must be 17 or later.

Replace 123456789 with the app ID that you requested from HUAWEI Developers.
<meta-data android:name="com.huawei.hms.client.appid" android:value="123456789" />
Before building the APK, configure the obfuscation configuration file to prevent the HMS Core SDK from being obfuscated.
-ignorewarnings
-keepattributes *Annotation*
-keepattributes Exceptions
-keepattributes InnerClasses
-keepattributes Signature
-keepattributes SourceFile,LineNumberTable
-keep class com.huawei.hianalytics.**{*;}
-keep class com.huawei.updatesdk.**{*;}
-keep class com.huawei.hms.**{*;}