如何将 mapbox-gl-native 项目导入 Android Studio?

How can I import mapbox-gl-native project into Android Studio?

我想在 Mapbox-gl-native 项目中 运行 Mapbox-GL-AndroidSDk-TestApp,但是当我导入 Android Studio 时,它不起作用。这是日志:

start activity ComponentInfo{com.mapbox.mapboxsdk.testapp/com.mapbox.mapboxsdk.testapp.MainActivity}: android.view.InflateException: Binary XML file line #32: Error inflating class com.mapbox.mapboxsdk.maps.MapView

Caused by: android.view.InflateException: Binary XML file line #32: Error inflating class com.mapbox.mapboxsdk.maps.MapView

Caused by: java.lang.UnsatisfiedLinkError: Couldn't load mapbox-gl from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.mapbox.mapboxsdk.testapp-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.mapbox.mapboxsdk.testapp-1, /vendor/lib, /system/lib]]]: findLibrary returned null

为了成功编译测试应用程序,我建议您检查两个 this install guide as well as this one。我假设您是在 OS X 上构建,但还有 Linux 的指南。如果您遇到任何错误,请告诉我,我很乐意帮助您。