-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: AndroidJavaException: java.lang.ClassNotFoundException: com.onesignal.OneSignal #562
Comments
Update |
Can we build now using minify? |
Can you try adding this line to your Proguard config:
This will ensure all OneSignal classes are kept when minifying. You can consider this as a work around for now. We will look into designing a Proguard config that can still allow some minification to OneSignal and include it in a future update so a manual step won't alway be required. |
Okay I’ll try it. Thanks!
From: Josh ***@***.***>
Sent: Friday, May 5, 2023 18:55
To: ***@***.***>
Cc: ***@***.***>; ***@***.***>
Subject: Re: [OneSignal/OneSignal-Unity-SDK] [Bug]: AndroidJavaException: java.lang.ClassNotFoundException: com.onesignal.OneSignal (Issue #562)
Can you try adding this line to your Proguard config:
…-keep com.onesignal.** { *; }
This will ensure all OneSignal classes are kept when minifying. You can consider this as a work around for now.
We will look into designing a Proguard config that can still allow some minification to OneSignal and include it in a future update so a manual step won't alway be required.
—
Reply to this email directly, view it on GitHub<#562 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AKPMVB4UTAJ5CR54KXZ7K7LXEUPFXANCNFSM6AAAAAASLAK7SE>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I have the same issue. I found out that the code went error when calling this line: OneSignal.Initialize("MY ONE SIGNAL ID"); I don't use proguard, I just follow the step from onesignal unity sdk setup steps. |
Same issue. |
On this
Please let us know if following this step fixes the issue for you. If not please provide an example Unity project so we can produce the issue on our end. |
What happened?
Update: I've figured out unity's proguard minify doesn't include some dependencies onesignal needs, resulting one signal initialization to fail. I can't disable minify because i can't build without it. So onesignal needs to patch itself to be compatible with proguard minify.
It looks like unity's single dex file is not enought to hold firebase firestore,auth and onesignal and using minify breaks things
I'm followed one signal unity sdk setup steps , no problems in editor. Wrote single line of code in my notificationsmanager c# script( OneSignal.Default.Initialize("xcvsdv");) But when i had built in my samsung phone a70, i didn't receive any notification ( i sent notification from dashbouard.) I noticed my phone haven't subscribed to audience. And got this message from autoconnected profiler
note: i did not do steps for amazon-store
AndroidJavaException: java.lang.ClassNotFoundException: com.onesignal.OneSignal
Steps to reproduce?
What did you expect to happen?
App to subscribe to onesignal audience
Unity version
2020.3.42
OneSignal Unity SDK version
3.0.6
Platform
Android
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: