0

I have the following layout in Android Studio 2.1

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:mapbox="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.kea.trimetrail.MainActivityFragment"
    tools:showIn="@layout/activity_main">

    <com.mapbox.mapboxsdk.maps.MapView
        android:id="@+id/mapview"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        mapbox:accessToken="@string/mapbox_access_token"/>

</RelativeLayout>

It displays the following error:

No resource identifier found for attribute 'accessToken' in package 'com.example.myapp'

In this case, the error is generated building a simple Mapbox application. I'm developing mapbox from source (yes, I need the source build, not the pre-built).

See:

https://github.com/mapbox/mapbox-gl-native/blob/master/INSTALL.md

The source tree is for multiple platforms, I'm using:

https://github.com/mapbox/mapbox-gl-native/tree/master/platform/android

The source build is located as a dependent library located at:

myapp/app/libs/mapbox-gl-native/platform/android

I've tried importing the module and more using other similar posts, but nothing helps.

While a solution to my particular issue would be awesome, simply understanding the cause of the message might help too. Everything I read is about specific solutions to similar messages, but I can't find any information about the message itself.

Thx

Mitch
  • 1,716
  • 3
  • 25
  • 41

1 Answers1

1

Not sure, but looks like they changed the name from accessToken to access_token. I can't tell for sure because this just brings up a new error. I'll assume the new error is something beyond the old error and not instead of.

Mitch
  • 1,716
  • 3
  • 25
  • 41
  • Hey, did you finally get it to work? I am getting the same bunch of errors now. – lidkxx Jun 06 '17 at 08:59
  • Found this https://github.com/mapbox/mapbox-gl-native/wiki/Android-4.x-to-5.0-update#mapbox-access-token in the documentation, maybe it will help you. – lidkxx Jun 06 '17 at 09:15