工作問題及解決方案記錄
1、Command PhaseScriptExecution failed with a nonzero exit code
need-to-insert-img
解決方案:
把pod里面數(shù)據(jù)都刪除,重新pod?install
2、flutter版本更新
flutter upgrade --force
在同步flutter?插件
Command?+ , ->Plugins?選擇更新
3、Xcode報(bào)錯:does not contain bitcode. You must rebuild it with bitcode enabled
解決方案:Build Setting?中設(shè)置Enable Bitcode為NO.
4朋腋、flutter:重新運(yùn)行項(xiàng)目的時候,一直卡在“Resolving dependencies...”
解決方案:打開Flutter SDK:flutter\packages\flutter_tools\gradle\flutter.gradle
buildscript {
repositories {
// google()
// jcenter()
maven{ url 'https://maven.aliyun.com/repository/google' }
maven{ url 'https://maven.aliyun.com/repository/jcenter' }
maven{url 'http://maven.aliyun.com/nexus/content/groups/public'}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
}
}
5、Xcode清理~/Library/Developerdd/Xcode/
清理:/DerivedData堪藐、Archives、iOS DeviceSupport
6挑围、[!] Invalid `Podfile` file: Missing `flutter_post_install(installer)` in Podfile `post_install` block.
?
target?'myapp'?do// 用的各sdk
end// 新增的配置
post_install?do?|installer|
??flutter_post_install(installer)?if?defined?(flutter_post_install)
end
need-to-insert-img
解決方案:在podflie文件添加新flutter版本需要
post_install do |installer|
flutter_post_install(installer) if defined?(flutter_post_install)
end
7庶橱、
[!] CocoaPods could not find compatible versions for pod "Flutter":
? In Podfile:
? ? Flutter (from `../flutter_module/.ios/Flutter`)
? ? FlutterPluginRegistrant (from `../flutter_module/.ios/Flutter/FlutterPluginRegistrant`) was resolved to 0.0.1, which depends on
? ? ? Flutter
Specs satisfying the `Flutter (from `../flutter_module/.ios/Flutter`), Flutter` dependency were found, but they required a higher minimum deployment target.
解決方案:
1、../flutter_module/.ios/podflie文件?對應(yīng)iOS版本是多少
2贪惹、flutter的版本對應(yīng)標(biāo)記的iOS是多少
../flutter_module/.ios/Flutter?Flutter.podspec
3當(dāng)前podflie文件保持一致后在pod install
8苏章、解決方案很簡單,?Library not loaded找到不到swfit依賴的庫奏瞬,那我們就直接指定swift的本地路徑就行了枫绅。
找到Runpath Search Paths添加參數(shù)/usr/lib/swift
9、Failed to build iOS app
可能就是緩存問題
bitcode設(shè)置問題硼端,運(yùn)行下并淋。Ios看看