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

exception when building example #66

Closed
sgehrman opened this issue Nov 26, 2019 · 1 comment
Closed

exception when building example #66

sgehrman opened this issue Nov 26, 2019 · 1 comment

Comments

@sgehrman
Copy link

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.

  • Where:
    Build file '/home/steve/google/flutter-cupertino-date-picker/example/android/app/build.gradle' line: 43

  • What went wrong:
    A problem occurred evaluating project ':app'.

path may not be null or empty string. path='null'

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  • Get more help at https://help.gradle.org

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
Copy link
Owner

Version 1.0.23+1 fixed this problem

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

2 participants