Getting the following error on simulator :
Rejecting re-init on previously-failed class java.lang.Class<androidx.activity.ComponentActivity$2>: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/lifecycle/LifecycleEventObserver;
I/r.strafenbeloo(16679): at java.lang.Object java.lang.Class.newInstance() (Class.java:-2)
I/r.strafenbeloo(16679): at android.app.Activity android.app.AppComponentFactory.instantiateActivity(java.lang.ClassLoader, java.lang.String, android.content.Intent) (AppComponentFactory.java:69)
I/r.strafenbeloo(16679): at android.app.Activity androidx.core.app.CoreComponentFactory.instantiateActivity(java.lang.ClassLoader, java.lang.String, android.content.Intent) (CoreComponentFactory.java:43)
I/r.strafenbeloo(16679): at android.app.Activity android.app.Instrumentation.newActivity(java.lang.ClassLoader, java.lang.String, android.content.Intent) (Instrumentation.java:1215)
I/r.strafenbeloo(16679): at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2831)
I/r.strafenbeloo(16679): at android.app.Activity android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.app.servertransaction.PendingTransactionActions, android.content.Intent) (ActivityThread.java:3048)
I/r.strafenbeloo(16679): at void android.app.servertransaction.LaunchActivityItem.execute(android.app.ClientTransactionHandler, android.os.IBinder, android.app.servertransaction.PendingTransactionActions) (LaunchActivityItem.java:78)
I/r.strafenbeloo(16679): at void android.app.servertransaction.TransactionExecutor.executeCallbacks(android.app.servertransaction.ClientTransaction) (TransactionExecutor.java:108)
I/r.strafenbeloo(16679): at void android.app.servertransaction.TransactionExecutor.execute(android.app.servertransaction.ClientTransaction) (TransactionExecutor.java:68)
I/r.strafenbeloo(16679): at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1808)
I/r.strafenbeloo(16679): at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:106)
I/r.strafenbeloo(16679): at void android.os.Looper.loop() (Looper.java:193)
I/r.strafenbeloo(16679): at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6669)
I/r.strafenbeloo(16679): at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
I/r.strafenbeloo(16679): at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:493)
I/r.strafenbeloo(16679): at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:858)
I/r.strafenbeloo(16679): Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.lifecycle.LifecycleEventObserver"
With following settings:
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
flutter_facebook_login: ^3.0.0
I have the same problem, can't find a solution
I had the iOS version in my Podfile to 11 I changed it back to 9 and the
problem was resolved.
Op vr 25 okt. 2019 om 17:09 schreef Melvin Massotti <
[email protected]>
I have the same problem, can't find a solution
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/roughike/flutter_facebook_login/issues/206?email_source=notifications&email_token=ABIJYPMMWESJIJQRN5ENJSTQQMD35A5CNFSM4JE7O4UKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECIUY4A#issuecomment-546393200,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABIJYPIJ6O63XCTSF7Q3DPLQQMD35ANCNFSM4JE7O4UA
.
I have no platform version specified in Podfile, but still have this problem. Anyway I don't understand the correlation between that and androidx problem, I think you solved it doing other things :)
@melvinm99 Ha you are right. I was confused :P I fixed an error which was related to iOS. The android error is still there. I get this error message for the facebook and google login modules btw.
Same for me: I get this error when trying to login with both Facebook and Google. Email login instead is working (I'm using Firebase)
I could solve it only creating a new flutter project and copying libs and assets
I could solve it only creating a new flutter project and copying libs and assets
@melvinm99 did that actually fix it
remove app build.gradle this code:
rootProject.allprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'androidx.core') {
details.useVersion "1.0.1"
}
if (details.requested.group == 'androidx.lifecycle') {
details.useVersion "2.0.0"
}
if (details.requested.group == 'androidx.versionedparcelable') {
details.useVersion "1.0.0"
}
}
}
}
@veicn Thanks, your solution worked for me.
Most helpful comment
remove app build.gradle this code:
rootProject.allprojects { project.configurations.all { resolutionStrategy.eachDependency { details -> if (details.requested.group == 'androidx.core') { details.useVersion "1.0.1" } if (details.requested.group == 'androidx.lifecycle') { details.useVersion "2.0.0" } if (details.requested.group == 'androidx.versionedparcelable') { details.useVersion "1.0.0" } } } }