Skobbler Maps on Android shows a black screen

I am using Skobbler SDK 2.3.0, targeting with Lollipop, testing with Nexus 5 and Galaxy S4 based on Android Studio 1.0.2.

I have one MainActivity with a box and navigation fragments. I initialize Skobbler in MainActivity and load the fragment that displays the maps. However, I only get a black screen with the “Powered by Scout OSM” watermark at the bottom right. Single and double responders are logged, but if I clamp to increase the number of application crashes.

I do not see errors in logcat before the application crashes. Can anyone help?

Project Structure:

  • application / LIES / SKMaps.jar
  • app / src / home / assets / SKMaps.zip
  • app / src / home / jniLibs / armeabi / libngnative.so
  • app / src / home / jniLibs / armeabi-v7a / libngnative.so
  • app / src / home / 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]

+4
source share
1 answer

You are missing one statement after initializing the map:

mapView.onResume();

If you look at an example from Skobbler, you will see that they copy textures to one Activityand show a map to another. Activitywhich shows the calls of the card mapView.onResume()and mapView.onPause()in the callbacks Activity. If you want to load textures and show the map in the same Activity, you will have to call mapView.onResume()after copying resources and initializing the map.

+9
source

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


All Articles