HERE Android Maps Integration, error MISSING_LIBRARIES

I followed the steps https://developer.here.com/mobile-sdks/documentation/android/topics/app-simple-android-studio.html

but I get an error like: Cannot initialize map fragment MISSING_LIBRARIES

Card initialization code:

mapFragment.init(new OnEngineInitListener() {
            @Override
            public void onEngineInitializationCompleted(OnEngineInitListener.Error error) {
                if (error == OnEngineInitListener.Error.NONE) {
                    // retrieve a reference of the map from the map fragment
                    map = mapFragment.getMap();
                    // Set the map center to the Vancouver region (no animation)
                    map.setCenter(new GeoCoordinate(49.196261, -123.004773, 0.0),
                            Map.Animation.NONE);
                    // Set the zoom level to the average between min and max
                    map.setZoomLevel(
                            (map.getMaxZoomLevel() + map.getMinZoomLevel()) / 2);
                } else {
                    System.out.println("ERROR: Cannot initialize Map Fragment " + error.toString());
                    Toast.makeText(MainActivity.this, " Error: " + error.toString(), Toast.LENGTH_LONG).show();
                }
            }
        });

gradle code

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

    defaultConfig {
        applicationId "com.chethan.mobileapp.startmap"
        minSdkVersion 15
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:22.2.1'
    compile 'com.android.support:design:22.2.1'
    compile files('libs/HERE-sdk.jar')
    compile files('libs/jts-1.14.jar')
}

manifest code:

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

    <uses-permission android:name="android.permission.INTERNET" />
    <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.CHANGE_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name"
            android:hardwareAccelerated="true"
            android:theme="@style/AppTheme.NoActionBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <meta-data android:name="com.here.android.maps.appid" android:value="Ksn3W" />
        <meta-data android:name="com.here.android.maps.apptoken" android:value="m90-Q" />
        <!--<meta-data android:name="com.here.android.maps.license.key" android:value="{J8XXfNbyt7M=}" />
-->
    </application>

</manifest>

any highly rated offers

+4
source share
3 answers

, . : https://developer.here.com/documentation Android Mobile SDK, SDK Android Starter SDK Android Premium. Starter, , Premium.

SDK , . : https://developer.here.com/mobile-sdks/documentation/android-hybrid-plus/topics/app-simple-android-studio.html ( " SDK " )

, , , :

  • , HERE SDK, HERE-sdk/libs/armeabi-v7a app/src/main/jniLibs/armeabi. jniLibs armeabi.

  • AndroidManifest.xml :

    <service android:name="com.here.android.mpa.service.MapService" android:label="HereMapService" android:process="global.Here.Map.Service.v2" android:exported="true" > <intent-filter> <action android:name="com.here.android.mpa.service.MapService" > </action> </intent-filter> </service>

UPDATE

SDK SDK 3.3, SDK Android Archive (AAR). , . AAR build.gradle . :.

// Assuming you have placed the HERE-sdk.aar in a folder 'libs'
repositories {
    flatDir {
        dirs 'libs'
    }
}

dependencies {
   ...
   compile(name: 'HERE-sdk', ext: 'aar')
   ...
}
+5

, here. , , ARM, x86.

"MISSING_LIBRARIES" HERE HP Pro Slate 10 EE G1. - x86, SDK . ARM Intel x86 Houdini. .

, , . , .

0

, lib JNI . buildType build.gradle:

        splits {
            abi {
                enable true
                reset()
                include 'armeabi-v7a'
                universalApk false
            }
        }
0
source

Source: https://habr.com/ru/post/1627395/


All Articles