Closed matteobelluzzo closed 4 years ago
@abhishek1508 @JunDai Is this still an issue in 1.0
?
Also this references to https://github.com/mapbox/mapbox-navigation-android/issues/3034
add to project's Application.class
initialisation of Mapbox like
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
Mapbox.getInstance(applicationContext, "access_token")
}
}
@RingerJK but this method causing to much crashes in crash report about Mapbox initialization.
Hello, I'm developing an android app that integrates map and mapbox navigation, but my program crashes when i click on "navigationStartButton".
In my Activity:
` @Override public void onMapReady(@NonNull final MapboxMap mapboxMap) { this.mapboxMap = mapboxMap;
build.gradle (Module: app)
`
apply plugin: 'com.android.application'
android { compileSdkVersion 29 buildToolsVersion "29.0.2" defaultConfig { applicationId "com.dw.ImcAppAndroid" minSdkVersion 21 targetSdkVersion 29 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
} `
dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs')
}`
Android API: compileSdkVersion 29, minSdkVersion 21, tested on 24 Mapbox Navigation SDK version: 8.6.0-alpha.1 **Mapbox Navigation UI version: 0.42.4
Expected behavior:
Start Navigation
Actual behavior :
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.app/com.mapbox.services.android.navigation.ui.v5.MapboxNavigationActivity}: android.view.InflateException: Binary XML file line #21: Binary XML file line #21: Error inflating class com.mapbox.services.android.navigation.ui.v5.instruction.InstructionView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2957) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6944) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374) Caused by: android.view.InflateException: Binary XML file line #21: Binary XML file line #21: Error inflating class com.mapbox.services.android.navigation.ui.v5.instruction.InstructionView Caused by: android.view.InflateException: Binary XML file line #21: Error inflating class com.mapbox.services.android.navigation.ui.v5.instruction.InstructionView Caused by: java.lang.reflect.InvocationTargetException