简体   繁体   中英

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

I want to run Mapbox-GL-AndroidSDk-TestApp in Mapbox-gl-native project, but when I import into Android Studio, it doesn't work. This is the Log:

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

To successfully compile the test app i'd suggest you check out both this install guide as well as this one . I'm assuming you are building on OS X but theres also a guide for Linux. Let me know if you get any errors and I'll gladly help you out.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM