Flutter Doctor gives Bad Cpu Type in executable - flutter

I'm using Mac mini , MacOs monterey and m1 chip. When trying to setup flutter, it is giving error.
command: flutter doctor
o/p: /Users/admin/Desktop/flutter/bin/internal/shared.sh: line 229: /Users/admin/Desktop/flutter/bin/cache/dart-sdk/bin/dart: Bad CPU type in executable
I have tried below command but it is also not working,
Terminal command: sudo softwareupdate --install-rosetta --agree-to-license
Terminal output:
By using the agreetolicense option, you are agreeing that you have run this tool with the license only option and have read and agreed to the terms.
If you do not agree, press CTRL-C and cancel this process immediately.
Rosetta 2 update is not available

you have to install rosetta first. In your terminal type:
/usr/sbin/softwareupdate --install-rosetta --agree-to-license

I got this error on MacOs VMware
and finaly I realized that i was downloaded the flutter sdk for arm Architecture, but i need this for x64 (intel) Architecture.

run "softwareupdate --install-rosetta" in the terminal

On macOs accidentally I downloaded arm architecture than x64 version.
Download proper version as per the system requirements.

My mistake was that , I had installed flutter sdk before installing the Rosetta. So that's why it was giving the above error. So, to resolve this, I removed the flutter sdk and installed rosetta first then again installed flutter and it worked properly.

Related

Flutter Doctor shows VSCode not installed, even though its installed in my computer

I am installing flutter for the first time in my laptop. When I ran flutter doctor it shows that VSCode is not installed, even though I have been using it for a while now.
I already have installed VSCode in my laptop but flutter doctor shows that it isn't installed. Ig its got something to do with the path. I'm not rly sure, kindly help....
As you know, you can make desktop applications with Flutter as well. Therefore Flutter need Visual Studio and "Desktop Development with C++" tool. Flutter doctor terminal says which version you need to install as well.
The warning message means you didn't installed Visual Studio (not visual-studio code).
You can download and install visual-studio to build windows app. Make sure to install Desktop development with C++.
You can follow this to build Windows app

Cannot open simulator in vs code

Hey I'm new at flutter can some one help me..?
I want to run flutter on UBUNTU 20.04 with Visual Studio Code
but when I run open -a simulator
it throws an error
Command 'open' not found, did you mean:
command 'wopen' from deb gworkspace.app (0.9.4-2)
command 'pen' from deb pen (0.34.1-1build1)
command 'gopen' from deb gnustep-gui-runtime (0.27.0-5build2)
Try: sudo apt install <deb name>
and I dont have Android Studio . some one help me to resolve this
Install android studio
From ADV manager in android studio, create a simulator.
After creation of a device, you can either run it from VScode without launching android studio, it'll be visible in device when you run your code. Or if you want to work with Android Studio, which I doubt you would want to do, it'll run from there out of the box also.
open -a simulator doesn't run on ubuntu, as the error says, open isn't defined.
On a MacOS, you can do that for an iOS emulator device, but it's Ubuntu, so no iOS.
I think you need Android studio to run the Android emulator or you can try to run it on a physical device

Unable to install Flutter on my windows machine

I am struggling in configuring Flutter on my windows laptop. Is Flutter supported on windows.
Windows support is work in progress https://github.com/flutter/flutter/issues/138
See also https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+windows+label%3A%22%E2%9D%96+platform-windows%22
Windows is now a supported OS for Flutter development. Install details here: https://flutter.io/setup-windows/.
Flutter now supports windows for development and can be installed using the guide mentioned in flutter docs https://flutter.dev/docs/get-started/install/windows ,
if you still face issue installing the flutter sdk,I recommend you reading my answer for flutter doctor doesn't work on neither Command Prompt or PowerShell window?

"Unable to locate GDB" in Trigger Toolkit

I'm attempting to run an iPhone app in the Trigger Toolkit, but I keep getting "Unable to locate GDB" in the console, several seconds after "Connecting to remote debug server" . I've updated xcode, installed gdb separately through homebrew, and am able to run it (gdb) through the command line.
Thanks in advance for any relevant advice!
I'm guessing you're using a pre-v2.0.1 platform version here, and that you've updated to Xcode 5?
I was able to reproduce this error in that configuration. Xcode 5 doesn't support GDB, which we were previously using to communicate with the app running on your device.
If updating to use newer platform versions isn't an option for you, you could use an older installation of Xcode (you can have several versions installed as siblings), and use xcode-select to point us at it, e.g.:
sudo xcode-select --switch /Applications/Xcode4.6/Xcode.app

Failed to install apk file in android?

I am installing apk file in android emulator. But when I gave the command ADB INSTALL CALENDAR.APK in command prompt it is displaying the error as Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]. What would be the reason? Can anybody help me regarding this?
Thank you,
All Android packages must be signed to be installed, well at least since version 1.6.
So that particular package is presumably older. You can get a newer one (or recompile yourself if you have the sources), or use an older version in your emulator (1.5).