Flutter not running on my Device - Android studio - flutter

Flutter not running on my Device - Android studio
Screenshot of the error:

Related

How to run Flutter commands on Android Studio Terminal

I can run the flutter project from the macOS terminal and Android Studio, but I can't run from Android Studio terminal.
Macbook Air M1
macOS Monterey 12.2
Android Studio Bumblebee | 2021.1.1 Patch 1
caps1
caps2
caps3
if Android Studio doesen't find the command flutter then Android Studio doesen't find the flutter sdk.
so please look if the path of the flutter sdk is correctly wittend.

Android Studio 4.1 Flutter doesn't recognizing android emuator

Flutter unable to run app
No connected devices found; please connect a device, or see flutter.dev/setup for getting started instructions.

Error connecting to the service protocol: Exception: Attempted to connect to Dart observatory 5 times, and all attempts failed. Giving up. The URL was

My app starts but then stops because of the error. I am using Windows 10, android studio as an IDE, and trying to build an android app.
if I use a terminal outside of Android studio it works, so it should be android studio related.
console:
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Gradle task 'assembleDebug'...
Built build\app\outputs\apk\debug\app-debug.apk.
Installing build\app\outputs\apk\app.apk...
Error connecting to the service protocol: Exception: Attempted to connect to
Dart observatory 5 times, and all attempts failed. Giving up. The URL was
ws://127.0.0.1:50997/ws
flutter Doctor:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.0.0, on Microsoft Windows [Version
10.0.16299.847], locale de-DE)
[!] Android toolchain - develop for Android devices (Android SDK 28.0.3)
X Android license status unknown.
[√] Android Studio (version 3.2)
[√] Connected device (1 available)
! Doctor found issues in 1 category.
If you have configured a proxy,
ensure you have also set the environment variable
NO_PROXY=127.0.0.1

Flutter Hello world app can't start on Android Emulator x86_64

I am currently working on Xamarin Forms and want to try Flutter.
I created a Flutter project with Android Studio. But I can't run it.
I get this error on Android Emulator
Error launching the application on Android SDK built for x86 64.
flutter doctor looks fine.
some example app like Flutter Gallery can work but some can't.
The platform is Windows 10 64 bit.
Android Studio 3.2.1
Error Message is:
Launching lib\main.dart on Android SDK built for x86 64 in debug
mode... Initializing gradle... Resolving dependencies...
Gradle task 'assembleDebug'... Built
build\app\outputs\apk\debug\app-debug.apk. Installing
build\app\outputs\apk\app.apk... Error: ADB exited with exit code
1 adb: failed to install
C:\Users\xxx\source\flutter\flutter_app\build\app\outputs\apk\app.apk:
Error launching application on Android SDK built for x86 64.
C:\flutter>flutter doctor Doctor summary (to see all details, run
flutter doctor -v): [√] Flutter (Channel stable, v1.0.0, on
Microsoft Windows [Version 10.0.17134.472], locale zh-TW) [√]
Android toolchain - develop for Android devices (Android SDK
28.0.3) [√] Android Studio (version 3.2) [√] IntelliJ IDEA Community Edition (version 2018.3) [!] VS Code, 64-bit edition
(version 1.30.1) [!] Connected device
! No devices available
! Doctor found issues in 2 categories.
As you can see from those lines:
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
You are missing the plugin for flutter and dart.
Go to:
File -> Settings -> Plugins
and install Flutter
And check to see if dart was installed as well

FirebaseAdMobPlugin.h file not found when using firebase_admob Plugin for Flutter

I can't build on iOS Simulator when using firebase_admob Plugin.
I can build on Android.
console log:
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
/Users/rkowase/StudioProjects/stopwatch/ios/Runner/GeneratedPluginRegistrant.m:6:9: fatal error: 'firebase_admob/FirebaseAdMobPlugin.h' file not found
#import <firebase_admob/FirebaseAdMobPlugin.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Could not build the application for the simulator.
Error launching application on iPhone X.
flutter doctor
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.1.5, on Mac OS X 10.12.6 16G1114, locale en-JP)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
[✓] Android Studio (version 3.0)
[✓] Connected devices (2 available)
• No issues found!
pubspec.yaml
dependencies:
flutter:
sdk: flutter
firebase_admob:
I use firebase_admob v0.5.0
https://pub.dartlang.org/packages/firebase_admob
Sample code
https://github.com/rkowase/flutter-firebase-admob-sample
I solved it by doing this workaround.
Links
"Made Podfiles use symlinks to local pods" not working · Issue #15099 · flutter/flutter
https://github.com/flutter/flutter/issues/15099
objective c - Swift compiler error: "non-modular header inside framework module" - Stack Overflow
Swift compiler error: "non-modular header inside framework module"
PathProvider not found on iOS build - Google Groups
https://groups.google.com/forum/#!msg/flutter-dev/7QRk1RphLDE/5rLS4CciBwAJ