I'm trying to use the sdk in a java android project.
I use this sdk :
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:6.3.0'
When i launch the screen with the Mapview, i got the "getDataNetworkTypeForSubscriber" error
When searching a solution to this error multiple answer tell to import this dependency
implementation 'com.mapbox.mapboxsdk:mapbox-android-telemetry:6.3.0'
But when i launch the screen with this dependecy i got this error :
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/mapbox/android/telemetry/MapEventFactory;
....
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.mapbox.android.telemetry.MapEventFactory" on path: DexPathList[[zip file "/data/app/~~rUziWglMhPfBsvW8AaITbQ==/com.trema.encheres.dev-aI_CEkUkLFmlvawtp7adLQ==/base.apk"],nativeLibraryDirectories=[/data/app/~~rUziWglMhPfBsvW8AaITbQ==/com.trema.encheres.dev-aI_CEkUkLFmlvawtp7adLQ==/lib/arm64, /data/app/~~rUziWglMhPfBsvW8AaITbQ==/com.trema.encheres.dev-aI_CEkUkLFmlvawtp7adLQ==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
What am I doing wrong ? Is there something i forgot ? A dependency ?
I try to add this dependency
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-core:6.3.0'
but i got the error message when building :
Could not find com.mapbox.mapboxsdk:mapbox-sdk-core:6.3.0.
Thanks
Related
My app (Ionic 5 + Cordova 9.1.0) crashes when I try to start it on an Android 11 phone. When I look into the logs with logcat I see that the main activity is not found:
10-21 16:31:29.281 5300 5300 E AndroidRuntime:
java.lang.RuntimeException: Unable to instantiate activity
ComponentInfo{de.meingolfclub.myapp/de.meingolfclub.myapp.MainActivity}:
java.lang.ClassNotFoundException: Didn't find class
"de.meingolfclub.myapp.MainActivity" on path: DexPathList[[zip file
"/data/app/~~7FMRVcshmIuFxkzCRS8B2g==/de.meingolfclub.myapp-kbOatrQJj_K4ZJHsuXESTg==/base.apk"],nativeLibraryDirectories=[/data/app/~~7FMRVcshmIuFxkzCRS8B2g==/de.meingolfclub.myapp-kbOatrQJj_K4ZJHsuXESTg==/lib/arm64,
/data/app/~~7FMRVcshmIuFxkzCRS8B2g==/de.meingolfclub.myapp-kbOatrQJj_K4ZJHsuXESTg==/base.apk!/lib/arm64-v8a,
/system/lib64, /system_ext/lib64]]
I googled a bit and it seems to be related to multiDex functionality of Android, but I have no idea how to fix this in an Ionic/Cordova project.
What can I do to solve this problem?
I solved it.
There was a wrong package name in MainActivity. After removing the Android platform and adding it again the package name was correct. And after a build the starts again.
Gradle migration : Unable to instantiate application ClassNotFoundException. Didn't find class “Application” on path: DexPathList
The problem is similar to this
Please check it to see what is happening.
I want to find other reserved words or other things would make this problem.
I have made an Android plugin to use GCM in my Unity app. When I try to start the RegistrationIntentService (readymade example class from Android Developer Manual site), it causes a crash with the exception
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.iid.InstanceID" on path: DexPathList[[zip file "/data/app/com.ex.test-1/base.apk"],nativeLibraryDirectories=[/data/app/com.ex.test-1/lib/arm, /vendor/lib, /system/lib]]
I have imported the play-services-9.2.0.unitypackage, without any success. Any help?
For anyone who might want to look for this question answered, I found the solution. The InstanceID.class is not included in the play-services-9.2.0.unitypackage, so include the play-services-iid-9.0.2.aar in the Android -> Plugins folder.
I followed the steps Binding a Jar Library.However, once I complie the process ,hundreds of warning was shown to me ,most of it were "couldn't load class" warning. I don't know what should I do.
The version of Xamarin is 5.9.5(build 10).
I'm sorry I haven't enough reputation to post the image. I copied some warning messages here.
D:\project_c#\Android\OsmDroid\OsmDroid\JARTOXML: Warning J2X9001: Couldn't load class microsoft/mappoint/TileSystem : java.lang.ClassNotFoundException: microsoft.mappoint.TileSystem (J2X9001) (OsmDroid)
D:\project_c#\Android\OsmDroid\OsmDroid\JARTOXML: Warning J2X9001: Couldn't load class net/wigle/wigleandroid/ZoomButtonsController$1 : java.lang.ClassNotFoundException: net.wigle.wigleandroid.ZoomButtonsController$1 (J2X9001) (OsmDroid)
D:\project_c#\Android\OsmDroid\OsmDroid\JARTOXML: Warning J2X9001: Couldn't load class net/wigle/wigleandroid/ZoomButtonsController$OnZoomListener : java.lang.ClassNotFoundException: net.wigle.wigleandroid.ZoomButtonsController$OnZoomListener (J2X9001) (OsmDroid)
Try setting the $(AndroidClassParser) MSBuild property to class-parse:
xbuild /p:AndroidClassParser=class-parse
or manually add the property to your .csproj
see - https://gist.github.com/prashantvc/09116d89ec5c8c4d4680d2b956862c0c#file-binding_sdkbase-csproj-L17
I am really getting desperate.
I have a working app - theoretically.
Tried to change the sdk version from 8 to 13.
Now when I start the app I get a Fatal exception, or rather a ClassNotFoundException for the very first activity started:
10-15 16:56:22.370: E/AndroidRuntime(862): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.pris/com.example.pris.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.pris.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.pris-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.pris-1, /system/lib]]
Apparently there seems to be some mixup with paths, but I have not the slightes idea where, or how to fix this.
Please help!
clean rebuild and restart project.. btw do you have any additional libraries??
if so get rid of them
lol..