Closed polyak01 closed 7 years ago
I not sure, but maybe it happens by: https://github.com/OneSignal/OneSignal-Android-SDK/blob/master/OneSignalSDK/app/build.gradle/#L21
I did some research. It happens only on low performance Chinese devices (Huawei, BlackView) with Android 5.0-5.1. On the Nexus 5, 5X with Android 7.0 and Samsung with Android 6.0 all is fine.
From time to time crashed showed error on different lines with liraries on Application class. From OneSignal to Twitter, Facebook, Hawk, calligraphy. But when I delete all OneSignal Dependencies and code from the project - all is fine. It is very strange.
So, I tried:
I'll be very grateful if you help to resolve this problem. If you need some testing or helping - you can to send me a msg.
A moment ago I tested it on Samsung Galaxy S4 with Android 5.0.1 and it also crashed. So, it is 21-22 API problem.
We did a lot of work with Gradle, Application class, multidex and after a lot of trying we fixed it. If in the future you need a solution for this case - you can to send me a msg. Thanks a lot for wonderful library!))
@polyak01 Good to hear you got it working! It sounds like it was a problem with multidex based on the error changing about each class was not defined. What was the last thing you changed that fixed it for you?
//This worked for me. place this in your default application File and make sure you enabled multidex in your gradle file. Compile this also : compile 'com.android.support:multidex:1.0.1'
@Override protected void attachBaseContext(Context base) { super.attachBaseContext(base); MultiDex.install(this); }
Hi. Some time ago I integrated OneSignal to some projects and all was fine. At the new one something goes wrong.
After integrated at the start of running I have a error msg:
also:
How can I resolve the problem?
OS in Application class:
Manifest:
<meta-data android:name="com.onesignal.NotificationOpened.DEFAULT" android:value="DISABLE"/>
Gradle: