I am new to flutter and Xcode, I got a new MacBook pro m1 max and I have a problem with my Xcode build when I try to launch my flutter application, flutter doctor gives me this error:
[!] Flutter (Channel stable, 3.3.8, on macOS 13.0.1 22A400 darwin-arm, locale en-FR)
• Flutter version 3.3.8 on channel stable at /Users/rixez/Developers/medissimo/mobil/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 52b3dc25f6 (8 days ago), 2022-11-09 12:09:26 +0800
• Engine revision 857bd6b74c
• Dart version 2.18.4
• DevTools version 2.15.0
✗ Downloaded executables cannot execute on host.
See https://github.com/flutter/flutter/issues/6207 for more information
and when I try to launch the application here is the message.
2022-11-17 10:24:39.622 xcodebuild[5938:33408] apply_selection_policy_once: avoid use of removable GPUs (via com.apple.dt.xcodebuild:GPUSelectionPolicy->avoidRemovable)
Do you have an idea to get rid of this problem?
I tried to change the GPUSelectionPolicy->avoidRemovable but it didn't change anything
Please try installing Rosetta as described here:
https://github.com/flutter/flutter/wiki/Developing-with-Flutter-on-Apple-Silicon
Related
I opened VSCode a few days ago to continue work on a Flutter project, unfortunately, the Flutter and Dart usually take a while to start(2-3 minutes), but this time,the extensions failed to initialize, and I'm left with white colourless code and no access to the tools that come with the extensions(i.e F5 for debug).screenshot of the current state of things
Over the past few days, I have,
Deleted and re-installed the Flutter SDK(forgive me, I cant remember what version it was at before, but now its 3.3.7, Dart 2.18.4)
Deleted and re-installed VSCode(used to be a snap, now a .deb)
Uninstalled and re-installed the Flutter and Dart extensions(multiple times, restarted VSCode each time)
- Ran said project directly from the terminal to be sure I had the flutter tool correctly installed(flutter run and flutter build apk ran fine, with no errors)
Please find the results of 'flutter doctor -v' below
Flutter (Channel stable, 3.3.7, on Ubuntu 20.04.5 LTS 5.15.0-52-generic,
locale en_NG)
• Flutter version 3.3.7 on channel stable at
/home/alabi/snap/flutter/common/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision e99c9c7cd9 (7 days ago), 2022-11-01 16:59:00 -0700
• Engine revision 857bd6b74c
• Dart version 2.18.4
• DevTools version 2.15.0
[!] Android toolchain - develop for Android devices (Android SDK version
32.1.0-rc1)
• Android SDK at /home/alabi/Android/Sdk
• Platform android-33, build-tools 32.1.0-rc1
• ANDROID_SDK_ROOT = /home/alabi/Android/Sdk
• Java binary at: /home/alabi/.jdks/openjdk-18.0.1.1/bin/java
• Java version OpenJDK Runtime Environment (build 18.0.1.1+2-6)
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/linux#android-setup for
more details.
[✗] Chrome - develop for the web (Cannot find Chrome executable at
google-chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Linux toolchain - develop for Linux desktop
• clang version 10.0.0-4ubuntu1
• cmake version 3.16.3
• ninja version 1.10.0
• pkg-config version 0.29.1
[!] Android Studio (not installed)
• Android Studio not found; download from
https://developer.android.com/studio/index.html
(or visit https://flutter.dev/docs/get-started/install/linux#android-setup
for detailed instructions).
[✓] VS Code (version 1.73.0)
• VS Code at /usr/share/code
• Flutter extension version 3.52.0
[✓] Connected device (1 available)
• Linux (desktop) • linux • linux-x64 • Ubuntu 20.04.5 LTS 5.15.0-52-generic
The CLI command, 'flutter --version' returns
Flutter 3.3.7 • channel stable • https://github.com/flutter/flutter.git
Framework • revision e99c9c7cd9 (7 days ago) • 2022-11-01 16:59:00 -0700
Engine • revision 857bd6b74c
Tools • Dart 2.18.4 • DevTools 2.15.0
All of this leads me to believe the Flutter SDK is installed correctly and the problem is with VSCode and the extensions
Any help is appreciated, thank you!
Make sure that you use official extensions for Flutter/Dart. They are created by Dart Code.
Fixed!
If something in the extension is corrupt you could try uninstalling the extensions and then deleting them from ~/.vscode/extensions (the ones starting dart-code) and then reinstall.
From DartCode's GitHub, read the issue and fix here if you're still confused
I have added my device id to admob console as test device.
When I build apk and install it on my test device, the ads work fine, But on other devices not.
I have searched a lot but there is no answer.
I used:
native_admob_flutter: ^1.5.0
Flutter doctor:
[√] Flutter (Channel stable, 2.5.2, on Microsoft Windows [Version 10.0.19044.1348], locale en-US)
• Flutter version 2.5.2 at C:\Src\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 3595343e20 (3 months ago), 2021-09-30 12:58:18 -0700
• Engine revision 6ac856380f
• Dart version 2.14.3
How can I know if this happen because of console or my flutter code?
Its not from your code its from your Ads serving company or Admob.
You have to add the other device as a test device otherwise you need to make your App reviewed if not it will rarely shows ads.
The command flutter test -p chrome /path/to/my/test/file.dart unable to work. What parameters should I use?
[√] Flutter (Channel stable, 2.0.3, on Microsoft Windows [Version 10.0.17763.1817], locale zh-CN)
• Flutter version 2.0.3 at D:\SDK\Flutter
• Framework revision 4d7946a68d (13 days ago), 2021-03-18 17:24:33 -0700
• Engine revision 3459eb2436
• Dart version 2.12.2
• Pub download mirror https://pub.flutter-io.cn
• Flutter download mirror https://storage.flutter-io.cn
Being a unit test you should not specify any platform. So the command should only be flutter test /path/to/my/test/file.dart
You only need to run on a specific platform in cases of integration tests.
If u using VScode Follow this steps
1.Step 1 area click anf then
2.Step 2 area Whatever device you want to choose
[][]
I have made many flutter projects, but suddenly I am unable to create a project. I thought it was an issue with VSCode, so, I installed the latest version. Didn't work! Then I tried in Android Studio. It got stuck at 'Creating Flutter Project'. I even tried in CMD. It remains stuck at
Running "flutter pub get" in note ...
Got TLS error trying to find package cupertino_icons at https://pub.dartlang.org.
pub get failed (server unavailable) -- attempting retry 1 in 1 second
This is flutter doctor -v
[√] Flutter (Channel stable, v1.17.5, on Microsoft Windows [Version 10.0.18363.657], locale en-IN)
• Flutter version 1.17.5 at C:\flutter
• Framework revision 8af6b2f038 (13 days ago), 2020-06-30 12:53:55 -0700
• Engine revision ee76268252
• Dart version 2.8.4
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at C:\Users\nithi\AppData\Local\Android\sdk
• Platform android-30, build-tools 29.0.2
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[√] Android Studio (version 4.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 47.1.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] VS Code (version 1.47.0)
• VS Code at C:\Users\nithi\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.12.2
[!] Connected device
! No devices available
! Doctor found issues in 1 category.
I looked into other answers.
Flutter SDK is stored at C:\flutter
I feel something is wrong with the SDK itself.
Can someone help me with this issue?
EDIT
This is flutter upgrade
Flutter is already up to date on channel stable
Flutter 1.17.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 8af6b2f038 (13 days ago) • 2020-06-30 12:53:55 -0700
Engine • revision ee76268252
Tools • Dart 2.8.4
Apologies for the lateness in this.
If this is in a Corporate work environment, there may be a 'man in the middle' security scanning app that's preventing the project from being created.
I was using Flutter just fine until my company instituted 'Zscaler'. Since that got implemented, I'd also freeze at that same error message. I had to turn Zscaler off for my Flutter projects to create.
I got a "Dart upgrade" in VS Code (win10)
right after when I try to create a new flutter web project
I got
Unable to execute Stagehand. Stagehand exited with code 65. stagehand 3.3.2 doesn't support Dart 2.3.1.
given that I didn't have this problem before,
I'm assuming that it's caused by the update.
I run "flutter upgrade" and this is my flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.7.8+hotfix.4, on Microsoft Windows
[Version 10.0.18362.295], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK
version 28.0.3) [√] Android Studio (version 3.4) [√] VS Code, 64-bit
edition (version 1.38.0) [!] Connected device
! No devices available
! Doctor found issues in 1 category.
and this is my "flutter --version"
Flutter 1.7.8+hotfix.4 • channel stable •
https://github.com/flutter/flutter.git Framework • revision 20e59316b8
(7 weeks ago) • 2019-07-18 20:04:33 -0700 Engine • revision fee001c93f
Tools • Dart 2.4.0
Any idea how to solve it?
Running
pub global activate stagehand
allows it to work again.