0

I am using this demo: https://github.com/mapbox/mapbox-android-demo/blob/a411fa95cd71c1b90a30895060b319310444aebb/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/plugins/LocationPluginActivity.java

I am trying to enable locationlayer in Mapbox to track my users location, the map works okay when I don't try to use locationlayer (without tracking), but I have copied that exact code into my app and all it does is crash on startup, this is the only Logcat message I get:

03-04 22:09:01.962 11249-11249/? E/Zygote: v2
03-04 22:09:01.963 11249-11249/? E/Zygote: accessInfo : 0
03-04 22:09:02.017 11249-11263/? E/art: Failed sending reply to debugger: Broken pipe
03-04 22:09:07.312 11249-11249/com.tech.gm.testapp E/libc++abi: terminating with uncaught exception of type jni::PendingJavaException
03-04 22:09:07.312 11249-11249/com.tech.gm.testapp A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 11249 (m.testapp)

                                                             [ 03-04 
22:09:07.313   527:  527 W/         ]
                                                             debuggerd: handling request: pid=11249 uid=10497 gid=10497 tid=11249

build.gradle:

// MAP BOX
compile 'com.mapbox.mapboxsdk:mapbox-android-sdk:5.5.0'
compile 'com.mapbox.mapboxsdk:mapbox-android-plugin-locationlayer:0.4.0'

Manifest:

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

Has anyone seen anything like this, or know why my app would crash?

user2101081
  • 445
  • 5
  • 22

1 Answers1

0

Okay after doing a lot of searching I found out that if you add the following to your build.gradle it will resolve your issue, it seems to be a bug that isn't reported any where from Mapbox.

compile 'com.mapbox.mapboxsdk:mapbox-android-services:2.2.9'
compile 'com.mapbox.mapboxsdk:mapbox-android-telemetry:2.2.9@aar'

EDIT: After trying to generate an apk this method will not work. Gives more errors.

user2101081
  • 445
  • 5
  • 22