Skip to content
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

App crashing after updating Segment to 4.7.1 #699

Closed
AdamGrzybkowski opened this issue Sep 2, 2020 · 5 comments
Closed

App crashing after updating Segment to 4.7.1 #699

AdamGrzybkowski opened this issue Sep 2, 2020 · 5 comments

Comments

@AdamGrzybkowski
Copy link

Stacktrace

Fatal Exception: java.lang.IllegalAccessError: Interface androidx.lifecycle.c implemented by class com.segment.analytics.AnalyticsActivityLifecycleCallbacks is inaccessible (declaration of 'com.segment.analytics.AnalyticsActivityLifecycleCallbacks' appears in base.apk)
       at com.segment.analytics.Analytics.<init>(Analytics.java:120)
       at com.segment.analytics.Analytics$Builder.build(Analytics.java:323)
       at io.example.android.segmentanalytics.di.SegmentAnalyticsModule$Companion.provideSegmentAnalytics$segmentanalytics_release(SegmentAnalyticsModule.java:2)

From what I could find it was introduced in this PR
#667

Adding -keep class androidx.lifecycle.DefaultLifecycleObserver proguard rule fixes this problem

@bsneed
Copy link
Contributor

bsneed commented Sep 8, 2020

cc @prayansh @migs647

@jimmy-jose
Copy link

Still having the issue in 4.9.0.
please add this to documentation -keep class androidx.lifecycle.DefaultLifecycleObserver if this is not gonna be fixed. Lost a lot of time because of this.

@Hospes
Copy link

Hospes commented Nov 9, 2020

Same for me, was forced downgrade to 4.8.2 instead.
Will add -keep class androidx.lifecycle.DefaultLifecycleObserver to proguard and check if this gonna work

@prayansh
Copy link
Contributor

prayansh commented Nov 9, 2020

Hi! Good callout, we will update our docs with the proguard config

@prayansh
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants