1,flutter导入二维码插件的时候,Android apk run正常运行,iPhone就不行,根据提示安装了brew 但是一直出错,
发现是github的ping不下来,ping github.com 然后到hosts修改
需要打开 https://ipchaxun.com/github.com/
然后修改第一个 改成自己的ip(就这个地址的ip最准确最快)
13.229.188.59 github.com
不然有可能你改完hosts以后ping可以下来数据,但是浏览器打不开github了。
2,每次新增flutter插件都要 get pagages,这样操作的话,iPhone的配置就有可能出错,所以会报错。就需要到ios文件内
pod repo update
pod install
来处理包管理,
如果报错:
[!] The following Swift pods cannot yet be integrated as static libraries:
1就找到 ios文件下 open podfile 然后里面
pod install 以后
出现了 Automatically assigning platform `ios` with version `8.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile
解决办法:
修改项目里的ios/Podfile文件,
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
platform :ios, '8.0' #增加的内容
又出现了
CocoaPods did not set the base configuration of your project because because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target BluePlaquesLondonFramework to Pods/Target Support Files/Pods/Pods.debug.xcconfig or include the Pods/Target Support Files/Pods/Pods.debug.xcconfig in your build configuration.
解决如下:在项目里把下面的Configuration
都改为None
,然后在pod install
在flutter中,把running的三个文件修改了
左边的三个文件也可以删了,我没有删,
之后再次 pod install就成功了