HERE map错误:缺少许可证密钥

时间:2017-03-09 08:27:34

标签: android sdk key licensing

我正在尝试从HERE做简单的BasicMapActivity + CompositeMapFragment教程,但无论我做什么,它都无法识别许可证密钥。

包裹名称与我在其网站上注册的包裹名称相同,也尝试将活动的名称放在他们网站的包裹中(我觉得非常非常荒谬),但这也没有解决。我添加了3个必需的元数据部分:appid,appcode,license key。仍然没有成功。还有其他提示吗?

BasicMapActivity.java

package hu.appz4.heretest;

import android.Manifest;
import android.content.pm.PackageManager;
import android.graphics.PointF;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.widget.ImageView;
import android.widget.Toast;

import com.here.android.mpa.ar.ARController;
import com.here.android.mpa.ar.ARController.Error;
import com.here.android.mpa.ar.ARIconObject;
import com.here.android.mpa.ar.ARObject;
import com.here.android.mpa.ar.CompositeFragment;
import com.here.android.mpa.common.GeoCoordinate;
import com.here.android.mpa.common.OnEngineInitListener;
import com.here.android.mpa.mapping.Map;
import com.here.android.mpa.mapping.MapFragment;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class BasicMapActivity extends AppCompatActivity {

}

的Manifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest package="hu.appz4.heretest"
          xmlns:android="http://schemas.android.com/apk/res/android">

    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    <!-- Additional permission for LiveSight -->
    <uses-permission android:name="android.permission.CAMERA"/>

    <application
        android:allowBackup="true"
        android:hardwareAccelerated="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <meta-data
            android:name="com.here.android.maps.appid"
            android:value="the appid i copied from here site"/>
        <meta-data
            android:name="com.here.android.maps.apptoken"
            android:value="the appcode i copied from here site"/>
        <meta-data
            android:name="com.here.android.maps.license.key"
            android:value="the license key i copied from here site"/>

You can see on this image that the package name is correct on the site too

1 个答案:

答案 0 :(得分:0)

通过在public class Xi : X { public int I { get; } public int[] Other { get; } public Xi(int i) { I = i; } public Xi(int[] i) { Other = i; } public static implicit operator Xi(int i) { return new Xi(i); } } 标记下移动<meta-data/>标记来解决此问题。