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

can't get the boilerplate code to run #51220 #2

Closed
anoobishnoob opened this issue Feb 21, 2020 · 1 comment
Closed

can't get the boilerplate code to run #51220 #2

anoobishnoob opened this issue Feb 21, 2020 · 1 comment

Comments

@anoobishnoob
Copy link

Steps to Reproduce

literally just running the project in here
https://github.com/SimpleBoilerplates/Flutter
Expected results:
not to crash. I have already ran flutter doctor and flutter pub get, and here are those outputs
flutter.bat doctor --verbose
[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18363.657], locale en-US)
• Flutter version 1.12.13+hotfix.8 at C:\Users\sqandil\Downloads\flutter_windows_v1.12.13+hotfix.8-stable\src\flutter
• Framework revision 0b8abb4 (10 days ago), 2020-02-11 11:44:36 -0800
• Engine revision e1e6ced81d
• Dart version 2.7.0

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at C:\Users\sqandil\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
• All Android licenses accepted.

[√] Android Studio (version 3.5)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 43.0.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] VS Code (version 1.42.1)
• VS Code at C:\Users\sqandil\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.8.1

[√] Connected device (1 available)
• SM A105G • RR8M60E8ZQH • android-arm • Android 9 (API 28)

• No issues found!
Process finished with exit code 0

and here is the flutter pub get

--no-color packages get
Running "flutter pub get" in HandAppPrototype... 1.0s
Process finished with exit code 0

Actual results:

I/flutter (24244): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════ I/flutter (24244): The following assertion was thrown building MyApp: I/flutter (24244): MediaQuery.of() called with a context that does not contain a MediaQuery. I/flutter (24244): No MediaQuery ancestor could be found starting from the context that was passed to MediaQuery.of(). I/flutter (24244): This can happen because you do not have a WidgetsApp or MaterialApp widget (those widgets introduce I/flutter (24244): a MediaQuery), or it can happen if the context you use comes from a widget above those widgets. I/flutter (24244): The context used was: I/flutter (24244): Scaffold I/flutter (24244): I/flutter (24244): The relevant error-causing widget was: I/flutter (24244): MyApp file:///C:/Users/sqandil/AndroidStudioProjects/handapp/lib/main.dart:13:10 I/flutter (24244): I/flutter (24244): When the exception was thrown, this was the stack: I/flutter (24244): #0 MediaQuery.of (package:flutter/src/widgets/media_query.dart:799:5) I/flutter (24244): #1 ScaffoldState.didChangeDependencies (package:flutter/src/material/scaffold.dart:2094:50) I/flutter (24244): #2 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4482:12) I/flutter (24244): #3 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4307:5) I/flutter (24244): #4 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3297:14) I/flutter (24244): #5 Element.updateChild (package:flutter/src/widgets/framework.dart:3091:12) I/flutter (24244): #6 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4349:16) I/flutter (24244): #7 Element.rebuild (package:flutter/src/widgets/framework.dart:4053:5) I/flutter (24244): #8 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4312:5) I/flutter (24244): #9 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4307:5) I/flutter (24244): #10 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3297:14) I/flutter (24244): #11 Element.updateChild (package:flutter/src/widgets/framework.dart:3091:12) I/flutter (24244): #12 RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:1054:16) I/flutter (24244): #13 RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:1025:5) I/flutter (24244): #14 RenderObjectToWidgetAdapter.attachToRenderTree. (package:flutter/src/widgets/binding.dart:968:17) I/flutter (24244): #15 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2512:19) I/flutter (24244): #16 RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:967:13) I/flutter (24244): #17 WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:848:7) I/flutter (24244): #18 WidgetsBinding.scheduleAttachRootWidget. (package:flutter/src/widgets/binding.dart:830:7) I/flutter (24244): #27 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398:19) I/flutter (24244): #28 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429:5) I/flutter (24244): #29 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12) I/flutter (24244): (elided 8 frames from package dart:async and package dart:async-patch) I/flutter (24244): I/flutter (24244): ════════════════════════════════════════════════════════════════════════════════════════════════════ I/flutter (24303): AppStarted I/flutter (24303): Transition { currentState: AuthenticationUninitialized, event: AppStarted, nextState: AuthenticationUnauthenticated }

@Sadmansamee
Copy link
Contributor

@anoobishnoob you should take a merge with the latest update with the repo's master branch, it has lots of updates including migrating AndroidX, Android embedding v2

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