2023-03-07

工作问题及解决方案记录

1、Command PhaseScriptExecution failed with a nonzero exit code


need-to-insert-img

解决方案:


把pod里面数据都删除,重新pod install

2、flutter版本更新

flutter upgrade --force

在同步flutter 插件

Command + , ->Plugins 选择更新

3、Xcode报错:does not contain bitcode. You must rebuild it with bitcode enabled

解决方案:Build Setting 中设置Enable Bitcode为NO.


4、flutter:重新运行项目的时候,一直卡在“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/

清理:/DerivedDataArchivesiOS 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文件 对应iOS版本是多少

2、flutter的版本对应标记的iOS是多少

../flutter_module/.ios/Flutter Flutter.podspec

3当前podflie文件保持一致后在pod install


8、解决方案很简单, Library not loaded找到不到swfit依赖的库,那我们就直接指定swift的本地路径就行了。

找到Runpath Search Paths添加参数/usr/lib/swift


9、Failed to build iOS app

可能就是缓存问题

bitcode设置问题,运行下。Ios看看

你可能感兴趣的:(2023-03-07)