GCM push noti in Unity3d causes gms.iid.InstanceID classnotfound - android

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.

Related

Android MapBox Java SDK error when displaying map

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

Ionic/Cordova app does not find MainActivity

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.

Android : Branch SDK Crash Issue in production build

I am using Branch SDK in my application (latest version of Android Branch SDK (v4.3.2))
Since last update I am facing class not found issue in production release. But in development it works without any issues. Here is the crash log from firebase.
Fatal Exception: java.lang.RuntimeException
Unable to instantiate receiver io.branch.referral.InstallListener: java.lang.ClassNotFoundException: Didn't find class "io.branch.referral.InstallListener" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/gman.vedicastro-dnsDZX6uCyAilVBlCp8zjQ==/base.apk"],nativeLibraryDirectories=[/data/app/gman.vedicastro-dnsDZX6uCyAilVBlCp8zjQ==/lib/arm64, /system/lib64]]
Caused by java.lang.ClassNotFoundException
Didn't find class "io.branch.referral.InstallListener" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/gman.vedicastro-dnsDZX6uCyAilVBlCp8zjQ==/base.apk"],nativeLibraryDirectories=[/data/app/gman.vedicastro-dnsDZX6uCyAilVBlCp8zjQ==/lib/arm64, /system/lib64]]
As per the document from branch, I have removed this code from Android Manifest file
<receiver android:name="io.branch.referral.InstallListener" android:exported="true">
   <intent-filter>
   <action android:name="com.android.vending.INSTALL_REFERRER" />
   </intent-filter>
</receiver>
Any idea why this issue happened?
Please help me to resolve this. Thanks.
It could be a cache issue particularly when multidex builds are involved. I did following steps and it solves the problem - 
Disabling instant run on Android Studio.
Running the following command  ./gradlew clean && ./gradlew cleanbuildcache (note syntax is slightly different on Windows).
Finally relaunch Android Studio via File -> Invalidate caches / restart ...
Also, please double check the latest Android SDK (v4.3.2) documentation and confirm that you have added all the necessary command/code in all of the files. Here's the link to the latest doc - https://docs.branch.io/apps/android/
I hope this helps to someone.
Happy Coding :)
Thanks for notifying us.
Our docs are currently all updated. On the bottom of each doc page, we notify on the last updated date for the docs.

CoreComponentFactoryDidn't find class "android.support.v4.app.CoreComponentFactory"

I got sudden crash in my google pixel 2 having android 9 version.
Is there any hint what is the reason behind that and it is not reproducible every time.
detail logs...
Didn't find class "android.support.v4.app.CoreComponentFactory" on
path: DexPathList[[zip file
"/data/app/com.google.android.deskclock-o_Iury9TRKVebStZjRrd0g==/base.apk"],nativeLibraryDirectories=[/data/app/com.google.android.deskclock-o_Iury9TRKVebStZjRrd0g==/lib/arm64,
/system/lib64]]
Just clean the build and run it will go away

android ClassNotFoundException after trying to change minimum sdk

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..

Categories

Resources