urbanairship / android-library

Urban Airship Android SDK
Other
109 stars 123 forks source link

Caused by java.lang.ClassNotFoundException: com.urbanairship.Logger #230

Closed aymenbs2 closed 11 months ago

aymenbs2 commented 11 months ago

❗For how-to inquiries involving Airship functionality or use cases, please contact (support)[https://support.airship.com/].

Preliminary Info

What Airship dependencies are you using?

implementation "com.urbanairship.android:urbanairship-accengage:16.7.5" implementation "com.urbanairship.android:urbanairship-fcm:16.7.5" implementation "com.urbanairship.android:urbanairship-automation16.7.5"

What are the versions of any relevant development tools you are using?

Report

What unexpected behavior are you seeing?

In my app i used the airshp dependecy blew with the version 16.7.5 and i get this crash on my firebase crashlytics dashbord : Caused by java.lang.ClassNotFoundException: com.urbanairship.Logger at com.urbanairship.accengage.PackageUpdatedReceiver.onReceive(PackageUpdatedReceiver.java:21) at android.app.ActivityThread.handleReceiver(ActivityThread.java:4894) at android.app.ActivityThread.-$$Nest$mhandleReceiver() at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2420) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8762) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

What is the expected behavior?

What are the steps to reproduce the unexpected behavior?

Do you have logging for the issue?

rlepinski commented 11 months ago

Could you give us the output of ./gradlew app:dependencies

aymenbs2 commented 11 months ago

yes : com.urbanairship.android:urbanairship-core:16.7.5 () | --- com.urbanairship.android:urbanairship-core:16.7.5 () +--- com.urbanairship.android:urbanairship-fcm:16.7.5 | +--- com.google.firebase:firebase-messaging:23.0.3 -> 23.0.8 () | +--- com.google.android.gms:play-services-base:18.0.1 () | --- com.urbanairship.android:urbanairship-core:16.7.5 () +--- com.urbanairship.android:urbanairship-automation:16.7.5 ()

rlepinski commented 11 months ago

I am not sure whats going on here, that class exists. Are you using any proguard rules you can provide?

aymenbs2 commented 11 months ago

After conducting an investigation, I revisited the commit release and discovered that there is a '+' symbol to obtain the latest version of dependencies, like so:

implementation "com.urbanairship.android:urbanairship-accengage:+" implementation "com.urbanairship.android:urbanairship-fcm:+" implementation "com.urbanairship.android:urbanairship-automation:+"

Additionally, on the Airship website, under "Contact Management" -> "Devices Properties," the SDK version is listed as 17.2.0.

rlepinski commented 11 months ago

Ok, so we dropped the Accengage module in 17 so if you remove that you should be good. That module is only helpful for migrations and can be removed now.

aymenbs2 commented 11 months ago

Thanks a lot thats work fine