dylanwuzh / flutter-cupertino-date-picker

Flutter cupertino style date picker.
Apache License 2.0
362 stars 416 forks source link

exception when building example #66

Closed sgehrman closed 4 years ago

sgehrman commented 5 years ago

steve@tr4:~/google/flutter-cupertino-date-picker/example$ flutter run Running "flutter pub get" in example... 3.1s Launching lib/main.dart on ONEPLUS A5010 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. E/flutter (10053): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: setState() called after dispose(): _LoadStuffButtonState#fb94d(lifecycle state: defunct, not mounted) E/flutter (10053): This error happens if you call setState() on a State object for a widget that no longer appears in the widget tree (e.g., whose parent widget no longer includes the widget in its build). This error can occur when code calls setState() from a timer or an animation callback. E/flutter (10053): The preferred solution is to cancel the timer or stop listening to the animation in the dispose() callback. Another solution is to check the "mounted" property of this object before calling setState() to ensure the object is still in the tree. E/flutter (10053): This error might indicate a memory leak if setState() is being called because another object is retaining a reference to this State object after it has been removed from the tree. To avoid memory leaks, consider breaking the reference to this object during dispose(). E/flutter (10053): #0 State.setState. (package:flutter/src/widgets/framework.dart:1112:9) E/flutter (10053): #1 State.setState (package:flutter/src/widgets/framework.dart:1147:6) E/flutter (10053): #2 _LoadStuffButtonState._clickLoadStuff. (package:simple_animations_example_app/examples/load_stuff_button.dart:83:7) E/flutter (10053): #3 _rootRunUnary (dart:async/zone.dart:1134:38) E/flutter (10053): #4 _CustomZone.runUnary (dart:async/zone.dart:1031:19) E/flutter (10053): #5 _FutureListener.handleValue (dart:async/future_impl.dart:139:18) E/flutter (10053): #6 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:680:45) E/flutter (10053): #7 Future._propagateToListeners (dart:async/future_impl.dart:709:32) E/flutter (10053): #8 Future._complete (dart:async/future_impl.dart:514:7) E/flutter (10053): #9 new Future.delayed. (dart:async/future.dart:313:16) E/flutter (10053): #10 _rootRun (dart:async/zone.dart:1122:38)
E/flutter (10053): #11 _CustomZone.run (dart:async/zone.dart:1023:19) E/flutter (10053): #12 _CustomZone.runGuarded (dart:async/zone.dart:925:7) E/flutter (10053): #13 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:965:23) E/flutter (10053): #14 _rootRun (dart:async/zone.dart:1126:13)
E/flutter (10053): #15 _CustomZone.run (dart:async/zone.dart:1023:19) E/flutter (10053): #16 _CustomZone.bindCallback. (dart:async/zone.dart:949:23) E/flutter (10053): #17 Timer._createTimer. (dart:async-patch/timer_patch.dart:23:15) E/flutter (10053): #18 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:384:19) E/flutter (10053): #19 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:418:5) E/flutter (10053): #20 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:174:12) E/flutter (10053):
Running Gradle task 'assembleDebug'...
Checking the license for package Android SDK Build-Tools 26.0.2 in /home/steve/Android/Sdk/licenses License for package Android SDK Build-Tools 26.0.2 accepted.
Preparing "Install Android SDK Build-Tools 26.0.2 (revision: 26.0.2)".
"Install Android SDK Build-Tools 26.0.2 (revision: 26.0.2)" ready.
Installing Android SDK Build-Tools 26.0.2 in /home/steve/Android/Sdk/build-tools/26.0.2
"Install Android SDK Build-Tools 26.0.2 (revision: 26.0.2)" complete.
"Install Android SDK Build-Tools 26.0.2 (revision: 26.0.2)" finished.
Checking the license for package Android SDK Platform 27 in /home/steve/Android/Sdk/licenses
License for package Android SDK Platform 27 accepted.
Preparing "Install Android SDK Platform 27 (revision: 3)".
"Install Android SDK Platform 27 (revision: 3)" ready.
Installing Android SDK Platform 27 in /home/steve/Android/Sdk/platforms/android-27
"Install Android SDK Platform 27 (revision: 3)" complete.
"Install Android SDK Platform 27 (revision: 3)" finished.

FAILURE: Build failed with an exception.

BUILD FAILED in 3m 13s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 194.2s (!) Gradle task assembleDebug failed with exit code 1

dylanwuzh commented 4 years ago

Version 1.0.23+1 fixed this problem