I got an M2 Macbook where I wanted to run my Flutter App which was previously built on an Intel chip. The App does not show any error but can’t be installed on both Android and iOS after the build finishes. I updated all dependencies but no solutions.
Android output:
Running Gradle task 'assembleDebug'...
Invalid depfile: /Users/taoufik/StudioProjects/culture_islamique_mac/.dart_tool/flutter_build/3411ceaa9368a0738c9da3ffddc7daff/kernel_snapshot.d
Invalid depfile: /Users/taoufik/StudioProjects/culture_islamique_mac/.dart_tool/flutter_build/3411ceaa9368a0738c9da3ffddc7daff/kernel_snapshot.d
✓ Built build/app/outputs/flutter-apk/app-debug.apk.
Installing build/app/outputs/flutter-apk/app-debug.apk...```
**iOS Output**
```Launching lib/main.dart on iPhone 15 in debug mode...
Running Xcode build...
Xcode build done. 28.9s
[ERROR:flutter/shell/platform/darwin/graphics/FlutterDarwinContextMetalImpeller.mm(42)] Using the Impeller rendering backend.
Error connecting to the service protocol: failed to connect to http://127.0.0.1:61374/pQCKnqnVpG8=/
the Dart compiler exited unexpectedly.```
Then runner quit.
2
Answers
The crush is caused by admob, AD Unit ID that wasn't added in the manifest file for android and in the info.plist for iOS. After adding them, it was all good.
The issue can be related to architecture compatibility between the Intel-based and M1/M2-based Macs caches.
Try these steps
For Android:
For ios