Hi, I am new to all this and trying to get in to flutter and learn it, while going through the install process on my MacBook after running “flutter doctor” I have these errors:
[!] Android toolchain – develop for Android devices (Android SDK version 30.0.1)
✗ Android licenses not accepted. To resolve this, run: flutter doctor
[!] Xcode – develop for iOS and macOS
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS and macOS platform side’s plugin
code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install see
I am trying to fix the cocoapods one first then I’ll move on to the Android issue, I’ve done the “sudo gem install cocoapods” command multiple times to install cocoapods but I keep errors every time. This is the full error:
Building native extensions. This could take a while…
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20210328-35795-2hn7gj.rb extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:546:in block in try_link0′
mktmpdir' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:543:in try_link0′
try_link' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:672:in try_ldflags’
pkg_config' from extconf.rb:9:in system_libffi_usable?’
from extconf.rb:42:in `
To see why this extension failed to compile, please check the mkmf.log which can be found here:
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/ffi-1.15.0/gem_make.out
Also here is the attached log file:
If anyone could help me get this installed so I could move on and start using flutter that would be great thanks.