异常

12147

IOS端异常

"Embedded binary's bundle identifier is not prefixed with the parent app's bundle identifier."

alt text

Flutter bug

  • FLUTTER 修改PUBSPEC.YAML 导致卡顿无响应问题修改

rm -Rf ~/Library/Application\ Support/Google/AndroidStudio*


  • Flutter_sonnd bug
  • Undefined symbols for architecture x86_64 \n

I fixed it with adding the Linker Flag -lstdc++ in Xcode Build Settings > Other Linker Flags.


  • flutter_sound
  • Undefined symbol: ___gxx_personality_v0 #666
  • 解决办法:
  1. add -lc++
  2. to your XCode > Runner > Target > Buld Settings > All > Linking > Other LInker Flags
  3. just add and it does resolves your bug

android Removing unused resources requires unused code shrinking to be turned on. 错误记录


Xcode 15: "Cycle inside ...; building could produce unreliable results" due to DSTROOT=/


IOS BUG: for architecture arm64

最有效的方法
ios/Runner.xcodeproj/project.pbxproj搜索EXCLUDED_ARCHS并将其修改为EXCLUDED_ARCHS = "arm64 i386";

podfile中

  1. post_install do |installer|
  2. installer.pods_project.targets.each do |target|
  3. flutter_additional_ios_build_settings(target)
  4. ———添加———————————————
  5. target.build_configurations.each do |config|
  6. config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "i386 arm64"
  7. end
  8. —————————————————————
  9. end
  10. end

Xcode - --no-sound-null-safety

Tagrget -> build settings -> + -> add ‘EXTRA_FRONT_END_OPTIONS’:--no-sound-null-safety

  • Flutter IDE启动禁用sound null safety
  • Android Studiio(原生开发,即根目录为android)
  • flutter项目内的android 目录下gradle.properties 增加extra-front-end-options=--no-sound-null-safety

Xcode(原生开发,即根目录为ios)
Build Settings-》User-Defined. 添加 键EXTRA_FRONT_END_OPTIONS ,值 --no-sound-null-safety


xcode 异常

  • 多包分配后可能出现的Bug
  • xcode rsync error: some files could not be transferred (code 23) at main.c
  • XCode14.X, 编译(build)正常,打包(Archive)出错
    ```
    PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/zhangzheng/Library/Developer/Xcode/DerivedData/OWON-abukyxpajbueubdempshornbemjw/Build/Intermediates.noindex/ArchiveIntermediates/OWON/IntermediateBuildFilesPath/OWON.build/Release-iphoneos/OWON.build/Script-361D99D13FFD29F042D080E7.sh (in target 'OWON' from project 'OWON')
    ......
    ......

sent 29 bytes received 20 bytes 98.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files could not be transferred (code 23) at /AppleInternal/Library/BuildRoots/97f6331a-ba75-11ed-a4bc-863efbbaf80d/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996) [sender=2.6.9]

Command PhaseScriptExecution failed with a nonzero exit code

```

解决办法

  • 步骤一,
    在Pods/Targets Support Files/Pods-NewTargetName/Pods-NewTargetName-frameworks.sh中找到代码 source="$(readlink "${source}")"
  • 步骤二,
    替换成source="$(readlink -f "${source}")", // 注意-f后边有个空格
  • 步骤三,
    重新Archive打包,就成功了