android 4.0.4 的 Mapbox gl 4.2.1 的致命信号 11

Fatal signal 11 for Mapbox gl 4.2.1 for android 4.0.4

我正在关注将 Mapbox 与 Android Studio 结合使用的演示应用程序,但我的应用程序一直崩溃并出现以下错误:

A/libc: Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1)

我的 java 和 xml 文件计算了以下演示中提供的代码:https://www.mapbox.com/android-sdk/examples/

任何帮助将不胜感激谢谢!

下面是错误列表:

01-09 17:49:21.898: E/dalvikvm(3182): Could not find class 'android.util.ArrayMap', referenced from method com.android.tools.fd.runtime.MonkeyPatcher.monkeyPatchExistingResources 
01-09 17:49:21.898: E/dalvikvm(3182): Could not find class 'android.util.ArrayMap', referenced from method com.android.tools.fd.runtime.MonkeyPatcher.pruneResourceCache 
01-09 17:49:21.953: E/MapboxEventManager(3182): Error Trying to load Staging Credentials: java.lang.NullPointerException 
01-09 17:49:22.148: E/dalvikvm(3182): Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method android.support.v7.widget.AppCompatImageHelper.hasOverlappingRendering    
01-09 17:49:22.210: E/OfflineManager(3182): Failed to read the storage key: null 
01-09 17:49:22.937: A/libc(3182): Fatal signal 11 (SIGSEGV)at 0x00000000 (code=1)

下面是我的Build.grade:

   apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.1"
    defaultConfig {
        applicationId "com.example.pmbi002.myapplication"
        minSdkVersion 15
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

repositories {
    mavenCentral()
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.1.0'
    testCompile 'junit:junit:4.12'

    compile ('com.mapbox.mapboxsdk:mapbox-android-sdk:4.2.1@aar'){
        transitive=true
    }

}

下面是我的清单文件:

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

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.INTERNET" />


    <uses-sdk android:minSdkVersion="15" />

    <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">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

        <service android:name="com.mapbox.mapboxsdk.telemetry.TelemetryService" />
    </application>

</manifest>

下面是我的Java代码:

package xxx;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.mapbox.mapboxsdk.MapboxAccountManager;
import com.mapbox.mapboxsdk.maps.MapView;
import com.mapbox.mapboxsdk.maps.MapboxMap;
import com.mapbox.mapboxsdk.maps.OnMapReadyCallback;


public class MainActivity extends AppCompatActivity {

    private MapView mapView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        // Mapbox access token is configured here. This needs to be called either in your application
        // object or in the same activity which contains the mapview.
        MapboxAccountManager.start(this, getString(R.string.access_token));

        // This contains the MapView in XML and needs to be called after the account manager
        setContentView(R.layout.activity_main);

        mapView = (MapView) findViewById(R.id.mapView);
        mapView.onCreate(savedInstanceState);
        mapView.getMapAsync(new OnMapReadyCallback() {
            @Override
            public void onMapReady(MapboxMap mapboxMap) {

                // Customize map with markers, polylines, etc.
            }
        });
    }
    // Add the mapView lifecycle to the activity's lifecycle methods
    @Override
    public void onResume() {
        super.onResume();
        mapView.onResume();
    }

    @Override
    public void onPause() {
        super.onPause();
        mapView.onPause();
    }

    @Override
    public void onLowMemory() {
        super.onLowMemory();
        mapView.onLowMemory();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        mapView.onDestroy();
    }

    @Override
    protected void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        mapView.onSaveInstanceState(outState);
    }
}

确保您已将所有 the permissions 和遥测服务放入您的清单中。除此之外,还要确保您在 class.

中包含了正确的导入
E/OfflineManager(3182): Failed to read the storage key: null

提示您可能正在离线使用?你能 post 一些代码吗,你的 gradle 文件看起来不错。