آخرین سوالاتدسته بندی: فلاترخطا برای استفاده از image_picker
raz 2 سال قبل

سلام عرض میکنم خدمت اساتید محترم من تو برنامه فلاترم میخوام یه عکس رو از گالری دریافت کنم خطای زیر رو میده ممنون میشم کمکم کنید:   Launching lib\\main.dart on Android SDK built for x86 in debug mode…[!] Your app isn\’t using AndroidX.To avoid potential build failures, you can quickly migrate your app by following the steps on https://goo.gl/CP92wY.Running Gradle task \’assembleDebug\’…C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\image_picker-0.6.7+8\\android\\src\\main\\java\\io\\flutter\\plugins\\imagepicker\\ImagePickerPlugin.java:15: error: cannot find symbolimport androidx.lifecycle.DefaultLifecycleObserver;^symbol: class DefaultLifecycleObserverlocation: package androidx.lifecycleC:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\image_picker-0.6.7+8\\android\\src\\main\\java\\io\\flutter\\plugins\\imagepicker\\ImagePickerPlugin.java:33: error: cannot find symbolimplements Application.ActivityLifecycleCallbacks, DefaultLifecycleObserver {^symbol: class DefaultLifecycleObserverlocation: class ImagePickerPluginC:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\image_picker-0.6.7+8\\android\\src\\main\\java\\io\\flutter\\plugins\\imagepicker\\ImagePickerPlugin.java:40: error: method does not override or implement a method from a supertype@Override^C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\image_picker-0.6.7+8\\android\\src\\main\\java\\io\\flutter\\plugins\\imagepicker\\ImagePickerPlugin.java:43: error: method does not override or implement a method from a supertype@Override^C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\image_picker-0.6.7+8\\android\\src\\main\\java\\io\\flutter\\plugins\\imagepicker\\ImagePickerPlugin.java:46: error: method does not override or implement a method from a supertype@Override^C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\image_picker-0.6.7+8\\android\\src\\main\\java\\io\\flutter\\plugins\\imagepicker\\ImagePickerPlugin.java:49: error: method does not override or implement a method from a supertype@Override^C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\image_picker-0.6.7+8\\android\\src\\main\\java\\io\\flutter\\plugins\\imagepicker\\ImagePickerPlugin.java:52: error: method does not override or implement a method from a supertype@Override^C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\image_picker-0.6.7+8\\android\\src\\main\\java\\io\\flutter\\plugins\\imagepicker\\ImagePickerPlugin.java:57: error: method does not override or implement a method from a supertype@Override^C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\image_picker-0.6.7+8\\android\\src\\main\\java\\io\\flutter\\plugins\\imagepicker\\ImagePickerPlugin.java:201: error: incompatible types: ImagePickerPlugin.LifeCycleObserver cannot be converted to LifecycleObserverlifecycle.addObserver(observer);^C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\image_picker-0.6.7+8\\android\\src\\main\\java\\io\\flutter\\plugins\\imagepicker\\ImagePickerPlugin.java:209: error: incompatible types: ImagePickerPlugin.LifeCycleObserver cannot be converted to LifecycleObserverlifecycle.removeObserver(observer);^Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output10 errors FAILURE: Build failed with an exception. * What went wrong:Execution failed for task \’:image_picker:compileDebugJavaWithJavac\’.> Compilation failed; see the compiler error output for details. * Try:Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output. Run with –scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 5sAndroidX incompatibilities may have caused this build to fail. Please migrate your app to AndroidX. See https://goo.gl/CP92wY.Finished with error: Gradle task assembleDebug failed with exit code 1