In order for CocoaPods integration to work at all, please either set the base configurations of the target `Runner` to `Target Support Files/Pods-Runner/` or include the `Target Support Files/Pods-Runner/` in your build configuration (`Flutter/Release.xcconfig`). This threw this error: CocoaPods did not set the base configuration of your project because your project already has a custom config set. I ran File > Invalidate Caches… > Invalidate and Restart. I ran gem list and the list of installed gems include: cocoapods (1.11.2) Without CocoaPods, plugins will not work on iOS or macOS.Įxception: CocoaPods not installed or not in valid state. Skipping pod install.ĬocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side. The error I get is Warning: CocoaPods not installed. I'm trying to test my app on my iPhone from Android Studio. I'm using Android Studio Bumblebee 2021.1.1. Now that you’re all set up, add cocoapods-embed-flutter as a plugin at the top of your Podfile: plugin 'cocoapods. Alternatively, if you don’t want to use Gemfile (even though I would highly suggest doing so), you can use sudo gem install cocoapods-embed-flutter to install this plugin. Updates and upgrades should be straightforward, and we can document builds and releases to a particular setup.Where does Android Studio expect to find CocoaPods? Could the problem be that Android Studio can't find the path to CocoaPods? gem 'cocoapods-embed-flutter' and run bundle install. The remaining dependencies are all installed via homebrew. This is what you should see if all the above was done right.Īfter completing all the above steps we now know that dart, flutter, ruby are all managed via asdf. export INTEL_HAXM_HOME=/usr/local/Caskroom/intel-haxmĮxport JAVA_HOME=$(/usr/libexec/java_home -v 1.8)įinally lets check our flutter install flutter doctor -v bash_profile files if you get complaints about haxm or java. Run sdkmanager to make sure all dependencies are installed (depends on adoptopenjdk8 that we installed via brew) sdkmanager We need to accept the android licences in order to build our flutter app for android flutter doctor -android-licenses We need to accept the licences for xcode in order to build ios apps sudo xcodebuild -license Simply open up the app, go to configure > plugins and then install from the dialog as shown below. You will need to install the flutter and dart plugins for android studio, otherwise flutter doctor will complain later on. Install the cocoapods dependencies pod setup The latest version of cocopads (1.8.4) doesn't respect the pod setup command on macOS catalina, so we have to use an older version until this bug is resolved. We don't need to use sudo we can install direct into the asdf ruby version. You can set these to local if you have multiple projects that rely upon different versions.Īsdf global flutter 1.12.13+hotfix.7-stableĬocoapods install on macOS Mojave and below asdf install dart 2.7.0Īsdf install flutter 1.12.13+hotfix.7-stable You can use the latest version of Ruby if you like, but I've come across issues. We will use ruby 2.3.7 because it allows us to install cocoapods on macOS catalina.Install the asdf plugins for dart, flutter and ruby.There are three steps for asdf, but this won't take long except depending on your download speed. adoptopenjdk8 prebuilt java binary to make sure the above android stuff works.intel haxm to help speed up flutter rendering.android studio to build flutter apps for android.android sdk for command line util sdkmanager.asdf for our dart, flutter and ruby runtimes.This will install the dependencies for flutter and asdf which we will use to install the runtimes. This could take a while depending on your download speed. You should also install xcode via the mac app store. If you don't have asdf installed already, you can follow my tutorial on how to install asdf You need to make sure you have homebrew installed and also asdf to manage runtime dependencies. Until a complete homebrew approach is released, I think this is a decent step by step approach. Moreover, we know where everything belongs and how to upgrade or uninstall if necessary. This is particularly valuable if you use different machines, or have team members in different locations. I came across too many issues, and it took a lot of stackoverflow and google searches to overcome.īy using a package manager to install dependencies and runtimes, we can share the exact same setup in different environments and automate the install and escape the above issues. I became particularly frustrated when trying to setup flutter on macOS Mojave and macOS Catalina. The official way to install the flutter and its dependencies is a mishmash of brew install, binary downloads alongside relying on system installed versions of ruby. How to install Flutter on macOS using homebrew and asdf
0 Comments
Leave a Reply. |