【问题标题】:INCORRECT_APP_CREDENTIALS here maps androidINCORRECT_APP_CREDENTIALS 这里映射 android
【发布时间】:2020-12-17 17:41:05
【问题描述】:

所以我按照教程在我的 android 应用程序上实现 HERE 地图。 在 AndroidManifest、依赖项 im app/build.gradle 中添加了凭据,但我收到此错误 = INCORRECT_APP_CREDENTIALS 有什么提示吗? 谢谢

【问题讨论】:

  • 这意味着您的凭据中存在拼写错误,或者您使用了错误的凭据。或者您的凭据不再有效。或者你粘贴到了错误的地方。无论哪种方式,您都可以尝试验证您是否设置了 HERE 帐户页面上显示的确切凭据。
  • 你下载的credentials.properties文件添加到.here目录了吗?

标签: android here-api heremaps-android-sdk


【解决方案1】:

除了将凭据正确添加到您的 AndroidManifest.xml 文件之外,您还需要确保应用程序包名称完全匹配(在清单和应用程序 gradle 文件中)。

build.gradle(应用程序):

android {
    ...

    defaultConfig {
        applicationId "PACKAGE NAME"
    ...
    }
    ...
}

AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
              xmlns:tools="http://schemas.android.com/tools"
              package="PACKAGE NAME">
...
    <meta-data
        android:name="com.here.android.maps.appid"
        android:value="APP ID" />
    <meta-data
        android:name="com.here.android.maps.apptoken"
        android:value="APP CODE" />
    <meta-data
        android:name="com.here.android.maps.license.key"
        android:value="LICENSE KEY" />

【讨论】:

  • 是的,我设法修复了它。主要是环境问题。感谢您的回复!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-02-22
  • 2020-08-15
  • 1970-01-01
  • 2011-12-11
相关资源
最近更新 更多