問(wèn)題1、錯(cuò)誤信息如下:
Showing All Messages
:-1: Cycle inside WeexEros; building could produce unreliable results. This usually can be resolved by moving the shell script phase 'h' so that it runs before the build phase that depends on its outputs.
Cycle details:
→ That command depends on command in Target 'WeexEros': script phase “[CP] Copy Pods Resources”
○ That command depends on command in Target 'WeexEros': script phase “[CP] Copy Pods Resources”
錯(cuò)誤原因:
Xcode 10 默認(rèn)使用的build system是New build system立美,與Xcode9不同牵敷。
解決方法:
1)第一種方法 不修改build system
根據(jù)error 日志御铃,script phase “[CP] Copy Pods Resources”似芝,而且與output有關(guān)蝶棋,應(yīng)該是使用了cocoapods導(dǎo)致的嵌赠,嘗試刪除該項(xiàng)目target-Copy Pods Resources-Output Files塑荒,成功解決問(wèn)題。選中項(xiàng)目target -> Build phase -> Copy Pods Resources -> Output Files -> 移除${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}
然后重新編譯姜挺,OK 齿税。
用這種方式緊接著會(huì)有下面的錯(cuò)誤:
error: Cycle in dependencies between targets 'yooweiExtension' and 'yoowei'; building could produce unreliable results.
Cycle path: yooweiExtension → yoowei → yooweiExtension
Cycle details:
→ Target 'yooweiExtension': CodeSign /Users/galahad/Library/Developer/Xcode/DerivedData/yoowei-drnrntneloepunakcqbcdycudqeh/Build/Products/Debug-iphoneos/yooweiExtension.appex
○ Target 'yooweiExtension': ProcessProductPackaging /Users/galahad/Library/Developer/Xcode/DerivedData/yoowei-drnrntneloepunakcqbcdycudqeh/Build/Intermediates.noindex/yoowei.build/Debug-iphoneos/yooweiExtension.build/yooweiExtension.appex.xcent
○ Target 'yooweiExtension' has target dependency on Target 'yoowei'
→ Target 'yoowei' has target dependency on Target 'yooweiExtension'
○ That command depends on command in Target 'yooweiExtension': script phase “[CP] Check Pods Manifest.lock”
對(duì)應(yīng)的解決方案:選中項(xiàng)目target -> Build phase -> Target Dependencies 去掉相互的依賴即可
2)第二種方法 修改build system
在Xcode菜單欄 -> File -> Workspace Setting,將build system修改為legacy build system炊豪,然后clean后編譯凌箕。
問(wèn)題2、 library not found for -lstdc++.6.0.9
ld: library not found for -lstdc++.6.0.9
clang: error: linker command failed with exit code 1 (use -v to see invocation)
錯(cuò)誤原因:
Xcode10中已去除這個(gè)library词渤。項(xiàng)目中有用到的話牵舱,可以從舊版本Xcode中copy一份過(guò)來(lái)。
解決方法:
舊版本Xcode /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib
路徑下copy一份libstdc++.6.0.9.tbd缺虐,放到Xcode10對(duì)應(yīng)目錄下芜壁。
另外提供附件下載地址
問(wèn)題3、Cycle inside xxxxx; build could produce unreliable results
Cycle inside xxxxx; build could produce unreliable results. This can usually be resolved by moving the app extension embedding build phase to the end of the list.
Cycle details:xxxxx
解決方法:
根據(jù)提示高氮,Target ->Build Phases下慧妄,把Embed APP Extensions移動(dòng)到列表末尾,問(wèn)題解決剪芍。