mac解决 flutter打包ios“error running pod install““Error installing libwebp“等一些列错误

如果遇到错误运行下面的命令行

flutter clean
rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec
flutter pub get
cd ios
pod install 

cd ..
flutter build ios
flutter run

在运行pod install的时候可能会遇到 Error installing libwebp,解决方案如下

pod repo 查看
//会看到一个path地址 xxx/trunk,拼接/Specs/1/9/2/libwebp/1.2.0
cd xxxxx/trunk/Specs/1/9/2/libwebp/1.2.0

vim libwebp.podspec.json
mac解决 flutter打包ios“error running pod install““Error installing libwebp“等一些列错误_第1张图片

把homepage和git换成https://github.com/webmproject/libwebp.git

然后继续重新pod install

【注意】这个时候可能又会卡在这里 继续重新运行pod install 1-2次就会成功

你可能感兴趣的:(flutter,flutter,macos,ios)