我在 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>
它显示以下错误:
在包“com.example.myapp”中找不到属性“accessToken”的资源标识符
在这种情况下,错误是在构建一个简单的 Mapbox 应用程序时生成的。我正在从源代码开发 mapbox(是的,我需要源代码构建,而不是预构建的)。
看:
https://github.com/mapbox/mapbox-gl-native/blob/master/INSTALL.md
源代码树适用于多个平台,我正在使用:
https://github.com/mapbox/mapbox-gl-native/tree/master/platform/android
源代码构建位于以下位置的依赖库:
myapp/app/libs/mapbox-gl-native/platform/android
我已经尝试使用其他类似的帖子导入模块和更多内容,但没有任何帮助。
虽然解决我的特定问题会很棒,但简单地了解消息的原因也可能会有所帮助。我阅读的所有内容都是关于类似消息的特定解决方案,但我找不到有关消息本身的任何信息。
谢谢