我正在使用Skobbler SDK 2.3.0版本,目标系统为Lollipop,在Nexus 5和Galaxy S4上进行测试,并在Android Studio 1.0.2上构建。
我有一个带有导航抽屉和片段的MainActivity。我在MainActivity中初始化Skobbler并加载显示地图的片段。然而,我只能看到一个黑屏,在右下角有“Powered by Scout OSM”的水印。单击和双击都可以被注册,但如果我捏合缩放,应用程序会崩溃。
在应用程序崩溃之前,我没有在logcat中看到任何错误信息。有人可以帮忙吗?
项目结构:
- app/libs/SKMaps.jar
- app/src/main/assets/SKMaps.zip
- app/src/main/jniLibs/armeabi/libngnative.so
- app/src/main/jniLibs/armeabi-v7a/libngnative.so
- app/src/main/jniLibs/x86/libngnative.so
build.grade:
dependencies {
...
...
compile files('libs/SKMaps.jar')
}
logcat
01-05 22:58:42.835 26785-26785/com.example.android I/MainActivity﹕ onCreate
01-05 22:58:42.869 26785-26785/com.example.android I/System.out﹕ Item selected in navigation drawer
01-05 22:58:42.895 26785-26785/com.example.android I/MainActivity﹕ Adding login fragment
01-05 22:58:42.895 26785-26785/com.example.android I/MainActivity﹕ Done
01-05 22:58:42.895 26785-26785/com.example.android I/MainActivity﹕ Initialising Skobbler
01-05 22:58:42.899 26785-26785/com.example.android I/MainActivity﹕ Start initializeLibrary()
01-05 22:58:42.899 26785-26785/com.example.android D/SKMaps﹕ SKMapInitSettings---- Map style [/storage/emulated/0/Android/data/com.example.android/files/SKMaps/daystyle/ , daystyle.json ,-1]
01-05 22:58:42.899 26785-26785/com.example.android D/SKMaps﹕ SKVersionManager----setMapUpdateListener - com.example.android.MainActivity@1c8a98bc
01-05 22:58:42.899 26785-26785/com.example.android I/MainActivity﹕ End initializeLibrary()
01-05 22:58:42.899 26785-26785/com.example.android I/MainActivity﹕ Skobbler initialised
01-05 22:58:42.899 26785-26785/com.example.android I/MainActivity﹕ onCreate end
...
01-05 22:58:55.790 26785-26785/com.example.android D/SKMaps﹕ SKMapSurfaceView----SKMapSurfaceView constructor
01-05 22:58:55.790 26785-26785/com.example.android D/SKMaps﹕ SKMapSurfaceView----os model Nexus 5
01-05 22:58:55.797 26785-26785/com.example.android D/SKMaps﹕ MapRenderer----Set map density 3.0
01-05 22:58:55.800 26785-26785/com.example.android D/SKMaps﹕ SKMapSurfaceView---- ON PAUSE
01-05 22:58:55.803 26785-26785/com.example.android D/SKMaps﹕ SKMapSurfaceView----Saved map cache state [ Map Region zoom=17.0 center= [13.385000228881836,52.51665115356445]] [Display mode=MODE_2D] [Follower mode=NONE] [Compass shown=false Position = [0.0 ,0.0] ] [Rotation=true ] [Panning=true][Zooming=true] [Bearing=0.0] [Annotations=0]
01-05 22:58:55.811 26785-26785/com.example.android E/BitmapFactory﹕ Unable to decode stream: java.io.FileNotFoundException: null/res/xhdpi/icon_map_popup_navigate.png: open failed: ENOENT (No such file or directory)
01-05 22:58:55.813 26785-26785/com.example.android E/BitmapFactory﹕ Unable to decode stream: java.io.FileNotFoundException: null/res/xhdpi/icon_map_popup_arrow.png: open failed: ENOENT (No such file or directory)
01-05 22:58:55.822 26785-26785/com.example.android D/SKMaps﹕ SKMapSurfaceView---- centerMapOnPosition [19.8171,41.3294]