Closed originlan closed 4 years ago
I don't quite understand why I think this LifecycleEventObserver is true,I have already add the
android{ configurations.all { resolutionStrategy { force 'androidx.media:media:1.0.0' force "androidx.lifecycle:lifecycle-runtime:2.1.0" } } } implementation "androidx.core:core:1.1.0" implementation 'androidx.lifecycle:lifecycle-runtime:2.0.0' implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0' implementation 'androidx.lifecycle:lifecycle-common-java8:2.0.0' annotationProcessor 'androidx.lifecycle:lifecycle-compiler:2.0.0'
angthing!
gradle.properties
android.useAndroidX=true
android.enableJetifier=true
I have alreay org.gradle.jvmargs=-Xmx1536M android.enableJetifier=true android.useAndroidX=true
but not work
try this: flutter/flutter#34401
Still won't work
In accordance with the #34401 only add implementation 'android.arch.lifecycle:common-java8:1.1.1' or nothing but,different to err
2019-10-01 00:39:07.613 10142-10142/com.yueli.sc_flutter E/AndroidRuntime: FATAL EXCEPTION: main Process: com.yueli.sc_flutter, PID: 10142 java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/lifecycle/LifecycleRegistry; at androidx.core.app.ComponentActivity.
(ComponentActivity.java:56) at androidx.activity.ComponentActivity. (ComponentActivity.java:84) at androidx.fragment.app.FragmentActivity. (FragmentActivity.java:127) at androidx.appcompat.app.AppCompatActivity. (AppCompatActivity.java:77) at com.yalantis.ucrop.UCropActivity. (UCropActivity.java:63) at java.lang.Class.newInstance(Native Method) at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95) at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:43) at android.app.Instrumentation.newActivity(Instrumentation.java:1243) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3182) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.lifecycle.LifecycleRegistry" on path: DexPathList[[zip file "/data/app/com.yueli.sc_flutter-9uC4M1ORZFKY1n983fv4pQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.yueli.sc_flutter-9uC4M1ORZFKY1n983fv4pQ==/lib/x86, /data/app/com.yueli.sc_flutter-9uC4M1ORZFKY1n983fv4pQ==/base.apk!/lib/x86, /system/lib, /system/product/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196) at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) at androidx.core.app.ComponentActivity. (ComponentActivity.java:56) at androidx.activity.ComponentActivity. (ComponentActivity.java:84) at androidx.fragment.app.FragmentActivity. (FragmentActivity.java:127) at androidx.appcompat.app.AppCompatActivity. (AppCompatActivity.java:77) at com.yalantis.ucrop.UCropActivity. (UCropActivity.java:63) at java.lang.Class.newInstance(Native Method) at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95) at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:43) at android.app.Instrumentation.newActivity(Instrumentation.java:1243) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3182) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Can you reproduce this issue on the example project?
It seems like #78
Yes,example is the work,so It's my engineering that's not compatible with it
Yes,example is the work,so It's my engineering that's not compatible with it
Hi @originlan, Have you resolved the problem? May I know how did you fix it? Thanks in advance.
Yes,example is the work,so It's my engineering that's not compatible with it
Hi @originlan, Have you resolved the problem? May I know how did you fix it? Thanks in advance.
sorry,It not fix to me
It works well with a new create project, of course it is just a simple one. I tried to replace android folder from the new simple project (I have made all settings compatible to my project, and make sure the simple project still work under the settings), but still getting the same error. I have totally run out of ideas. Any help or advice is highly appreciated.
@originlan @jasonlaw i have the same issue as you, i fixed it (but it throws some errors regarding my cloud_firestore dependencies now in the console, but it works).
the 2 ways i found are upgrading gradle and kotlin (root build.gradle):
ext.kotlin_version = '1.3.0' classpath 'com.android.tools.build:gradle:3.3.1'
or pasting this voodoo in your app/build.grade: https://stackoverflow.com/a/54923461
First of all, thank you very much for the update of the Widget. However, I found a problem today. After selecting the picture, my project will report this error. thanks
doctor