简体   繁体   English

在华为 Map 套件中使用谷歌地图 sdk android 实用程序库

[英]Using Google's maps sdk android utility library in Huawei Map Kit

I am trying to migrate Google Maps to Huawei Map kit.我正在尝试将 Google 地图迁移到华为 Map 套件。 But there are no features for ClusterManager, ClusterItem, DefaultClusterRenderer etc.但是没有 ClusterManager、ClusterItem、DefaultClusterRenderer etc 的功能。

Now I am trying to use below this library for it:现在我试图在这个库下面使用它:

But I do not know how to implement it.但我不知道如何实现它。 I opened Gradle window and expand Tasks under my project then double-clicked assemble but it did not extract that.aar file and gave me below error:我打开 Gradle window 并在我的项目下展开任务然后双击 assemble 但它没有提取 that.aar 文件并给我以下错误:

在此处输入图像描述

How to solve this?如何解决这个问题? How to implement this library?如何实现这个库? Anyone here to implemented this successfully?有人在这里成功实施这个吗?

dependencies {
   implementation(name: '3rd-maps-utils-2.2.0-yyyyMMdd', ext: 'aar')
...
}

UPDATE更新

1.You need refer Github to download the code. 1.您需要参考Github下载代码。

2.Run the code, click library->Tasks->build->assemble. 2.运行代码,点击library->Tasks->build->assemble。

3.After Run, find 3rd-maps-utils-2.1.0-yyyyMMdd.aar file in library/build/outputs/aar/ path. 3.运行后,在library/build/outputs/aar/路径下找到3rd-maps-utils-2.1.0-yyyyMMdd.aar文件。

4.Copy 3rd-maps-utils-2.1.0-yyyyMMdd.aar file to your own app/libs/ path. 4.将3rd-maps-utils-2.1.0-yyyyMMdd.aar文件复制到自己的app/libs/路径下。

5.Add codes below in project build.gradle file. 5.在项目build.gradle文件中添加以下代码。

allprojects {
       repositories {
              ...
              flatDir {
                     dirs 'libs'
              }
       }
}

6.Add codes below in app build.gradle file. 6.在app build.gradle文件中添加以下代码。

dependencies {
    implementation(name: '3rd-maps-utils-2.1.0-yyyyMMdd', ext: 'aar')
    ...
}

You can refer this screenshoot where you can find the assemble in the upper right corner of AS by clicking "Gradle":)您可以参考此屏幕截图,您可以通过单击“Gradle”在 AS 的右上角找到组装:)

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM