flutter stuck on Compiling, linking and signing - flutter

Flutter project is stuck in Compiling, linking and signing... i dont just understand why this is stuck here...
even using verbose i dont get any stack trace on why this is stuck...
Launching lib/main.dart on iPhone 13 Pro Max in debug mode...
Running pod install... 11.6s
Running Xcode build...
└─Compiling, linking and signing...

The problem should be in the existing project created on previous environment (old versions) and has to be resolved by creating a new one and moving content in.
Move all my custom contents from existing my project (assets, fonts, lib folders and config files...) to this new project and ran the command : the flutter build ios command works well now !

following this : Fixing Xcode 9 issue: "iPhone is busy: Preparing debugger support for iPhone"
I TRIED :
On Xcode:
Go to "Window" -> "Devices and Simulators"
"Unpair iPhone" (on the side list, right clic)
Then:
Unplug and plug again the USB cable
Press Trust in the prompt message in the device
in Flutter Terminal, paste and enter :
flutter clean
flutter pub get
cd ios
pod install --repo-update
cd ..
Then run the app.
==> Worked only 1st time for me.
My work around for launching IOS devices for now:
Each time I want IOS device,
I COPY/ PASTE and press ENTER on the Terminal:
flutter clean
flutter pub get
cd ios
pod install --repo-update
cd ..
flutter run

Related

Flutter macOS app: Unable to find executable to run

I have an app that runs perfectly on the iPhone simulator and Chrome. However, when I try to run it as native macOS app, it fails with the below error dump. I tried running flutter clean but no luck. Can anyone please help me with it? Do let me know if I can share any files that can help debug this issue.
% flutter run -d macos
Launching lib/main.dart on macOS in debug mode...
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:x86_64, id:XYZ-ABC }
{ platform:macOS, name:Any Mac }
Building macOS application...
Unable to find app name. /location/myApp/macos/Flutter/ephemeral/.app_file
name does not exist
Unable to find executable to run
Error launching application on macOS.
Try recreating your macos directory. For example, by running the following bash script from your top-level Flutter project directory.
# Archive macos directory just in-case you want to undo later
mv macos ~/Desktop/
# Recreate macos directory from scratch
flutter create --platforms=macos .
# Try again to run the app on macos
flutter run -d macos

Flutter Will not run on IOS Simulator - Pods_Runner.framework' is missing one or more architectures

I upgraded to Flutter 2.5.0 and now I cannot run on an IOS simulator, from either Android Studio or the command line.
It fails with the error
Runner.xcodeproj: error: The linked framework 'Pods_Runner.framework' is missing one or more architectures
required by this target: arm64. (in target 'Runner' from project 'Runner')
I can manage to run on the Simulator from XCode without an issue
I can run on a device from Android Studio or command line
I have tried
restarting the simulator.
cleaning the build folder
upgrading Cocoapods to 1.11.1
Flutter Doctor says that everything is fine.
----------------- Edit ------------------
The situation Eventually Resolved Itself.
This is a problem because of ARM64 for me. This helped for me.
Be sure to open .xcworkspace.
Adding "arm64" to Project -> Build Settings -> Excluded Architecture
The reason why this might have been happened is because Xcode has been updated to a newer version. You gotta love Xcode..

Error: ADB exited with exit code 1 - remedy?

I am trying to debug a demo app of flutter in vscode where the error is showing for ADB exit with code 1
performing streamed install. I uninstall the existing Flutter demo app.
You should try with these three stuff:
Check out if your emulator memory full.
Check your package name is alright
Clean your flutter and re-run
flutter clean
flutter run
as APK built is Successful there is no issue with the code.
there is something wrong with the device
check u enabled USB debugging
check u enabled install over USB in developer option
few devices don't have to enable install over USB.
then
flutter clean && flutter pub get
uninstall the app in the device and run
flutter run -d <device name>
emphasized text

After uninstall app on device flutter run not work

I'm using vs code for building my flutter app.
But after uninstall debug app on my device, 'flutter run' command not working properly and stop in installing status.
Please help me.
Thanks.
Launching lib/main.dart on RNE L21 in debug mode...
Initializing gradle... ۱۱٫۷s
Resolving dependencies... ۱۴٫۹s
Gradle task 'assembleDebug'...
Gradle task 'assembleDebug'... Done ۱۰۱٫۷s
Built build\app\outputs\apk\debug\app-debug.apk.
Installing build\app\outputs\apk\app.apk... ۶٫۱s
It seems like when you uninstall the flutter application, though it is no longer available on the phone It is not deleted properly(Only in the flutter case). Therefore to fix this. you can run adb and uninstall from the package. Here is a step-by-step procedure.
If you are in windows:
Step 1. Open your SDK path in command prompt
eg.
C:\Users\kharag\AppData\Local\Android\Sdk\platform-tools
Step 2. Search your app package name from the flutter app (It will be in AndroidManifest.xml)
eg.
com.mycodingchannel.icttapp
Step 3. Now uninstall your app by running the command:
adb uninstall com.mycodingchannel.icttapp
That's all, Now run your app and it should work. Thanks
Had the same problem, copied .apk file on device and installed it from there, after that debugger worked without any issues.
Once you see Built/..... in termial. The apk has been created. Now if the installing fails/takes long time. Go to [app folder\app\outputs\apk]
Copy the app.apk/debug.apk any other file to your device and install it.
Now once you re-run it will work fine.
If that doesn't work flutter clean+flutter pub get. Follow the above step.

Ionic emulate Ios fails to run The session does not open my app

Ionic emulate ios failed on Mac OS Yosemite. Their have some cases were the ios device emulated, but shortly after the terminal console shoots up the error message below.
** BUILD SUCCEEDED **
No target specified for emulator. Deploying to iPhone-6 simulator
An error was encountered processing the command (code=146):
Invalid device state
An error was encountered processing the command (code=146):
Exception encountered connecting to CoreSimulatorBridge: Unable to connect to CoreSimulatorBridge
ENOENT, no such file or directory '/Users/yay/Library/Logs/CoreSimulator/2CAA2C39-7F22-4AF2-BBDE-86609188F37C/system.log'
Error code 1 for command: ios-sim with args: launch,/Users/yay/code/myApp/platforms/ios/build/emulator/myApp.app,--devicetypeid,com.apple.CoreSimulator.SimDeviceType.iPhone-6,--stderr,/Users/yay/code/myApp/platforms/ios/cordova/console.log,--stdout,/Users/yay/code/myApp/platforms/ios/cordova/console.log,--exit
Error: /Users/yay/code/myApp/platforms/ios/cordova/run: Command failed with exit code 2
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:134:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
The issue is because you used sudo to create and/or build the project.
Just input these commands (without the $ of course):
1) Remove with sudo
$ sudo ionic platform remove ios
2) Add iOS back without sudo
$ ionic platform add ios
3) Run iOS emulator
$ ionic emulate ios
Source: https://github.com/driftyco/ionic/issues/4052 (rajkotecha's comment)
Do NOT use sudo when creating or building the project.
Please see https://github.com/driftyco/ionic/issues/4052
I've encountered this issue before, and I believe you messed up with your permission. However, I managed to solve it by reinstall everything from scratch (NOT reformat OS). I suggest you may try to remove all your Xcode, ionic, cordova, and ios-sim content and reinstall again.
Delete your Xcode from your Mac OS.
Remove everything inside:
/usr/local/bin
/usr/local/include
/usr/local/lib/dtrace
/usr/local/share/man/man1
/usr/local/share/systemtap/tapset/
Delete the folder:
/usr/local/lib/node_modules
Once you done the instruction above, kindly use your spotlight to search for keywords such as node, cordova, ionic, etc... to see whether it is still exist or not. Please also ensure yourApp within your Users/username folder is deleted.
You may also try to use your terminal input:
npm -v
cordova -v
ionic -v
It will shows nothing/not found if you've deleted everything completely.
Now you can download and install Xcode from App Store, and wait for Xcode is fully installed in your Mac, then proceed to here to start again your ionic project.
Lastly, once you begin to create an ionic project, by right you no need to use any sudo commands anymore in creating or building this project.
Example:
ionic build ios
Instead of:
sudo ionic build ios
It should be working unless you are not the root user.
Happy coding and have a nice day! :D