Note the ways to handle common bug
[!] Android Studio (version 2022.1)
• Android Studio at C:\Program Files\Android Studio\Android Studio 2022.1.1.13
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
X Unable to find bundled Java version.
• Try updating or re-installing Android Studio.
- Step 1: Command run in terminal
cd /Applications/Android\ Studio.app/Contents/jbr
ln -s ../jbr jdk
ln -s "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" jdk
- Step 2: Go to finder and find Android studio:
1. Right click and show package contents
2. At `Contents` then create new folder called jre
3. Copy contents of the jbr folder and paste into jre folder
- Step 3: Run again
flutter doctor -v
- Command run in terminal:
cd /Applications/Android\ Studio.app/Contents/jre
ln -s ../jre jdk
ln -s "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" jdk
flutter doctor -v
flutter doctor -v
[!] Flutter (Channel stable, 3.7.4, on macOS 13.1 22C65 darwin-arm64, locale en-VN)
• Flutter version 3.7.4 on channel stable at /Users/dab.dev/FlutterDev/flutter
! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart/2.18.0/libexec/bin/dart, which is not inside your current Flutter SDK checkout at
/Users/dab.dev/FlutterDev/flutter. Consider adding /Users/dab.dev/FlutterDev/flutter/bin to the front of your path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision b4bce91dd0 (30 hours ago), 2023-02-21 09:50:50 +0800
• Engine revision 248290d6d5
• Dart version 2.19.2
• DevTools version 2.20.1
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
Type in nano ~/.zshrc:
export PATH="/Users/development/flutter/bin:$PATH"
Run brew install cocoapods
- For mac M1:
$ sudo gem install cocoapods
[!] CocoaPods could not find compatible versions for pod "AppAuth":
In snapshot (Podfile.lock):
AppAuth (= 1.4.0)
In Podfile:
flutter_appauth (from `.symlinks/plugins/flutter_appauth/ios`) was resolved to 0.0.1, which depends on
AppAuth (= 1.6.0)
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* changed the constraints of dependency `AppAuth` inside your development pod `flutter_appauth`.
You should run `pod update AppAuth` to apply changes you've made.
- Delete
Podfile.lock
- Run
pod install
Or
- Run
pod update AppAuth
5. LoadError - dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/lib/ffi_c.bundle, 0x0009): missing compatible arch in /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/lib/ffi_c.bundle - /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/lib/ffi_c.bundle
- Run
sudo arch -x86_64 gem install ffi
- Then run
arch -x86_64 pod update Firebase/Auth
- Run command:
flutter downgrade <version>
- This command will use a specific version number. You can have the list of the available version numbers using flutter downgrade or here
- Refer: https://stackoverflow.com/a/56127174
Follow the below steps.
- Goto Build Phase tab.
- Drag /Embed App Extension' and place it below 'Run script'.
- Run it gain.
Referecens: https://stackoverflow.com/a/77138033