Я пытаюсь интегрировать навигацию mapbox в моем приложении для Android, и когда я пытаюсь запустить код для тестирования на мобильном телефоне, я получаю эту ошибку.
Странно то, что если я запускаю его на эмуляторе, он работает без проблем ...
Я уже пытался найти эту ошибку в Google, но просто не могу найти ответ, который может мне помочь.
Я получаю следующую ошибку
E/AndroidRuntime: FATAL EXCEPTION: main
Process: upt.cti.com.testapp, PID: 20632
java.lang.RuntimeException: Unable to get provider com.mapbox.android.telemetry.provider.MapboxTelemetryInitProvider: java.lang.ClassNotFoundException: Didn't find class "com.mapbox.android.telemetry.provider.MapboxTelemetryInitProvider" on path: DexPathList[[zip file "/data/app/upt.cti.com.testapp-W7F_WF7ciClLNb_MtYNj9g==/base.apk"],nativeLibraryDirectories=[/data/app/upt.cti.com.testapp-W7F_WF7ciClLNb_MtYNj9g==/lib/arm64, /data/app/upt.cti.com.testapp-W7F_WF7ciClLNb_MtYNj9g==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /product/lib64]]
at android.app.ActivityThread.installProvider(ActivityThread.java:7215)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6699)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6600)
at android.app.ActivityThread.-wrap2(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
at android.os.Handler.dispatchMessage(Handler.java:108)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7529)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.mapbox.android.telemetry.provider.MapboxTelemetryInitProvider" on path: DexPathList[[zip file "/data/app/upt.cti.com.testapp-W7F_WF7ciClLNb_MtYNj9g==/base.apk"],nativeLibraryDirectories=[/data/app/upt.cti.com.testapp-W7F_WF7ciClLNb_MtYNj9g==/lib/arm64, /data/app/upt.cti.com.testapp-W7F_WF7ciClLNb_MtYNj9g==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /product/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.ActivityThread.installProvider(ActivityThread.java:7200)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6699)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6600)
at android.app.ActivityThread.-wrap2(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
at android.os.Handler.dispatchMessage(Handler.java:108)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7529)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
Suppressed: java.io.IOException: Failed to open dex files from /data/app/upt.cti.com.testapp-W7F_WF7ciClLNb_MtYNj9g==/base.apk because: Failure to verify dex file '/data/app/upt.cti.com.testapp-W7F_WF7ciClLNb_MtYNj9g==/base.apk': Bad method handle type 7
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:353)
at dalvik.system.DexFile.<init>(DexFile.java:100)
at dalvik.system.DexFile.<init>(DexFile.java:74)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:374)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:337)
at dalvik.system.DexPathList.<init>(DexPathList.java:157)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:65)
at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:64)
at com.android.internal.os.PathClassLoaderFactory.createClassLoader(PathClassLoaderFactory.java:43)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:75)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:38)
at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:719)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:752)
at android.app.LoadedApk.getResources(LoadedApk.java:1005)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2489)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6497)
... 8 more
и файл градля следующий:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "upt.cti.com.testapp"
minSdkVersion 26
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
repositories {
mavenCentral()
maven { url 'https://mapbox.bintray.com/mapbox' }
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:support-media-compat:28.0.0'
implementation 'com.android.support:exifinterface:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:7.3.2'
implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.37.0'
}
Я пытаюсь создать свое собственное навигационное приложение, следуя этому руководству, но я застрял в получении указаний.
https://docs.mapbox.com/help/tutorials/android-navigation-sdk/