Android Skobbler地图从后台返回后崩溃

Android Skobbler地图从后台返回后崩溃,android,android-activity,skmaps,Android,Android Activity,Skmaps,我正在开发一个应用程序,我正在使用skobbler sdk 2.4,当我打开Map时遇到了一个问题,然后我转到后台打开一个需要大量内存的应用程序,比如Clash of Clans:p 几秒钟后,当我返回到包含映射的活动时,它变为黑色,2秒钟后,它将此错误告知logcat: A/libc﹕ Fatal signal 11 (SIGSEGV), code 1, fault addr 0x44 in tid 27000 (GLThread 72284) 我在sdk附带的示例中也尝试了同样的方法,起初

我正在开发一个应用程序,我正在使用skobbler sdk 2.4,当我打开Map时遇到了一个问题,然后我转到后台打开一个需要大量内存的应用程序,比如Clash of Clans:p

几秒钟后,当我返回到包含映射的活动时,它变为黑色,2秒钟后,它将此错误告知logcat:

A/libc﹕ Fatal signal 11 (SIGSEGV), code 1, fault addr 0x44 in tid 27000 (GLThread 72284)
我在sdk附带的示例中也尝试了同样的方法,起初它崩溃了,因为它找不到保存在应用程序实例中的字符串路径。我已经解决了这个问题,并修复了来自application class
DemoApplication
的空异常崩溃。这不是问题。问题出在地图上

在这之后,我在同一点,我有同样的问题,甚至与示例应用程序。映射崩溃,在活动处于后台后无法再次初始化自身


任何建议都非常感谢:)

感谢SylviA,在我检查示例应用程序时,我试图修复空指针异常问题并通过电子邮件发送它

当我第二次编写代码时,我意识到我做错了什么,这就是这次荒谬的崩溃的原因

在这里,我发布了代码中的一部分,在
MapActivity.class
中初始化map时,我在其中进行了更改。这些更改是在
DemoUtils.class

/**
 * Initializes the SKMaps framework
 */
public static void initializeLibrary(final Context context) {
    final DemoApplication app = (DemoApplication)context.getApplicationContext();
    // get object holding map initialization settings
    SKMapsInitSettings initMapSettings = new SKMapsInitSettings();
    // set path to map resources and initial map style

    SharedPreferences mSharedPreferences = context.getSharedPreferences("map",0);
    if(app.getMapResourcesDirPath()==null) { // here happens the first error
        Toast.makeText(context,"Null Exception Error avoided", Toast.LENGTH_SHORT).show();
        app.setMapResourcesDirPath(mSharedPreferences.getString("map_path",null));
    }else {
        SharedPreferences.Editor mEditor = mSharedPreferences.edit();
        mEditor.putString("map_path",app.getMapResourcesDirPath());
        mEditor.commit();
    }

    initMapSettings.setMapResourcesPaths(app.getMapResourcesDirPath(),
            new SKMapViewStyle(app.getMapResourcesDirPath() + "daystyle/", "daystyle.json"));
我做错的是这一行,是这样的:

initMapSettings.setMapResourcesPaths(app.getMapResourcesDirPath(),
            new SKMapViewStyle( null + "daystyle/", "daystyle.json"));
initMapSettings.setMapResourcesPaths(app.getMapResourcesDirPath(),
            new SKMapViewStyle( app.getMapResourcesDirPath() + "daystyle/", "daystyle.json"));
必须这样做:

initMapSettings.setMapResourcesPaths(app.getMapResourcesDirPath(),
            new SKMapViewStyle( null + "daystyle/", "daystyle.json"));
initMapSettings.setMapResourcesPaths(app.getMapResourcesDirPath(),
            new SKMapViewStyle( app.getMapResourcesDirPath() + "daystyle/", "daystyle.json"));

感谢您的时间:)

我们不知道有任何此类问题,您能发送给我们吗dev@skobbler.com你的演示项目?您在哪些设备上进行过测试?我正在使用lg g3 D855(安卓5.0)。明天我会给你发一封电子邮件,告诉你我的演示项目。我找到了问题的解决方案:D