Flutter ios打包报错 cannot load such file — sqlite3 (LoadError)

Flutter命令行 flutter build ipa 打包报错

cannot load such file — sqlite3 (LoadError)
xcode kernel_require rb require usr/bin/ipatool:24
The data couldn’t be read because it isn’t in the correct format


 

[+14639 ms] 2021-12-27 17:25:00.807 xcodebuild[13713:54898] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path
“/var/folders/_1/qbgn6bsx0952vtr7s1mhn57c0000gn/T/Runner_2021-12-27_17-25-00.806.xcdistributionlogs”.
2021-12-27 17:25:01.163 xcodebuild[13713:54975] CFURLRequestSetHTTPCookieStorageAcceptPolicy_block_invoke: no longer implemented and should not be called
2021-12-27 17:25:11.099 xcodebuild[13713:54898] -[NSNull path]: unrecognized selector sent to instance 0x7fff80768eb0
** INTERNAL ERROR: Uncaught exception **
Uncaught Exception: -[NSNull path]: unrecognized selector sent to instance 0x7fff80768eb0
Stack:
0 __exceptionPreprocess (in CoreFoundation)
1 objc_exception_throw (in libobjc.A.dylib)
2 -[NSObject(NSObject) __retain_OA] (in CoreFoundation)
3 forwarding (in CoreFoundation)
4 _CF_forwarding_prep_0 (in CoreFoundation)
5 -[IDEDistributionProcessingPipeline process:] (in IDEFoundation)
6 -[IDEDistributionPackagingStep loadFromExportOptions:error:] (in IDEFoundation)
7 -[IDEDistributionDriver runWithDestinationPath:error:] (in IDEFoundation)
8 -[Xcode3CommandLineBuildTool _distributeArchiveAndExit] (in Xcode3Core)
9 -[Xcode3CommandLineBuildTool run] (in Xcode3Core)
10 main (in xcodebuild)
11 start (in libdyld.dylib)
[ +1 ms] Building IPA… (completed in 14.6s)
[ +7 ms] “flutter ipa” took 251,318ms.
[ +9 ms] Encountered error while building IPA:
[ ]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 BuildIOSArchiveCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:176:7)

#2 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1140:27)

#3 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#4 CommandRunner.runCommand (package:args/command_runner.dart:209:13)

#5 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:288:9)

#6 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#7 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:236:5)

#8 run.. (package:flutter_tools/runner.dart:62:9)

#9 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#10 main (package:flutter_tools/executable.dart:94:3)

[ +254 ms] ensureAnalyticsSent: 253ms
[ +134 ms] Running shutdown hooks
[ ] Shutdown hooks complete

在 Flutter 打 ipa 包的时候出现了问题
如果用 Xcode distribute app的时候会出现 The data couldn’t be read because it isn’t in the correct format ,
跟踪错误日志,会提示找不到 sqlite3,虽然查询本地已经安装了,但还是找不到。

解决办法 

  1. 安装 CFPropertyList
    sudo gem install CFPropertyList
    

  2. 安装 sqlite3
    sudo gem install sqlite3
    

  3. 更新环境
    rvm use system --default
    

  4. 重启电脑  

     如果不确定有没有安装 ,可以通过下面命令检查。

sudo gem list | grep sqlite3

转自:ios打包报错 cannot load such file — sqlite3 (LoadError)_wapchief的博客-CSDN博客

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值