我正在使用 HMS Maps,为此我遵循他们的文档。
对于此查询,我尝试了此链接。我也添加了 SHA-256 密钥和 agconnect-services.json 文件。
我所做的步骤是:
app gradle 中的依赖项:implementation 'com.huawei.hms:maps:6.0.0.301'
在 app gradle 中:apply plugin: 'com.huawei.agconnect'
我的根 gradle 是:
buildscript {
repositories {
maven { url 'http://developer.huawei.com/repo/' }
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
classpath 'com.google.gms:google-services:4.3.3'
classpath 'com.huawei.agconnect:agcp:1.2.1.301'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven {url 'http://developer.huawei.com/repo/'}
google()
jcenter()
mavenCentral()
maven {
url 'https://jitpack.io'
}
maven {
url "https://github.com/QuickBlox/quickblox-android-sdk-releases/raw/master/"
}
}
}
我在 AppGallery 连接处添加了 SHA-256 密钥。
从 AppGallery 连接启用 MapApi。
在我的项目中下载并添加了“agconnect-services.json”文件。
在解决了一些与线程相关的问题后,我能够产生 logcat 错误,并且说“非法指纹”。
我知道,这与 AppGallery 的一些集成问题有关,但我无法理解我所缺少的,我正在遵循所有步骤。
**Logcat 是:**
2021-08-31 10:35:22.520 30490-30773/com.moody.poster E/HmsMapKit_AuthenticateClient_1074: Exception occur
com.huawei.hms.maps.foundation.client.d: *1*0*2*:*I*L*G*L*F*N*E*P*I*T
at com.huawei.hms.maps.foundation.client.d$d.c(:89)
at com.huawei.hms.maps.foundation.client.c.d(:22556)
at com.huawei.hms.maps.foundation.client.c.c(:88)
at com.huawei.hms.maps.maproute.client.auth.e.d(:76)
at com.huawei.hms.maps.maproute.client.auth.e.a(Unknown Source:0)
at com.huawei.hms.maps.maproute.client.auth.b.a(Unknown Source:4)
at com.huawei.hms.maps.foundation.client.c$a.e(:492)
at com.huawei.hms.maps.maproute.client.auth.e.c(:1074)
at com.huawei.hms.maps.maproute.cache.c$b.e(:298)
at com.huawei.hms.maps.maproute.cache.c$b.call(:291)
at eU.a(:42)
at em.d(:12025)
at fc$b.run(:96)
at eq$c.run(:571)
at fj.run(:66)
at fj.call(:57)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:929)
2021-08-31 10:35:22.528 30490-30773/com.moody.poster E/HmsMapKit_ErrorTraceLogPusher_509: cache error trace log : ErrorTraceLogDTO{ scenario = ACCESS_SERVICE_ERROR', message='010002 : ILLEGAL_FINGERPRINT'}
com.huawei.hms.maps.foundation.client.d: *1*0*2*:*I*L*G*L*F*N*E*P*I*T
at com.huawei.hms.maps.foundation.client.d$d.c(:89)
at com.huawei.hms.maps.foundation.client.c.d(:22556)
at com.huawei.hms.maps.foundation.client.c.c(:88)
at com.huawei.hms.maps.maproute.client.auth.e.d(:76)
at com.huawei.hms.maps.maproute.client.auth.e.a(Unknown Source:0)
at com.huawei.hms.maps.maproute.client.auth.b.a(Unknown Source:4)
at com.huawei.hms.maps.foundation.client.c$a.e(:492)
at com.huawei.hms.maps.maproute.client.auth.e.c(:1074)
at com.huawei.hms.maps.maproute.cache.c$b.e(:298)
at com.huawei.hms.maps.maproute.cache.c$b.call(:291)
at eU.a(:42)
at em.d(:12025)
at fc$b.run(:96)
at eq$c.run(:571)
at fj.run(:66)
at fj.call(:57)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:929)
2021-08-31 10:35:22.536 30490-30773/com.moody.poster E/HmsMapKit_AuthenticateCache_333: other err occur,errorCode : .010002 : ILLEGAL_FINGERPRINT
2021-08-31 10:35:22.775 30490-30490/com.moody.poster E/HmsMapKit_AccessTraceLogPusher_16: analyticsInstance is null
2021-08-31 10:35:22.778 30490-30490/com.moody.poster E/HmsMapKit_UserEventLogPusher_16: analyticsInstance is null