我正在尝试按照以下步骤安装框架,使用 EarlGrey 2.0 将 UI 测试添加到我的项目中:https ://www.youtube.com/watch?v= KQaA11qVQn0(使用 Cocoapods)。它构建成功,但是当我尝试运行测试时,出现此错误:
2020-11-27 14:18:16.076586+0700 X-UITests-Runner[75526:5465621] The bundle X-UITests” couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle.
2020-11-27 14:18:16.076704+0700 X-UITests-Runner[75526:5465621] (dlopen_preflight(/X-blqsydhdzeecqndvwzwsshajcwdm/Build/Products/Debug-iphonesimulator/X-UITests-Runner.app/PlugIns/X-UITests.xctest/X-UITests): Library not loaded: @rpath/Alamofire.framework/Alamofire
Referenced from: /X-blqsydhdzeecqndvwzwsshajcwdm/Build/Products/Debug-iphonesimulator/X-UITests-Runner.app/PlugIns/X-UITests.xctest/X-UITests
Reason: image not found)
我的 podfile 上有这个:
use_frameworks!
def shared_pods
pod 'Alamofire'
pod 'Firebase'
pod 'Firebase/Analytics'
pod 'Firebase/RemoteConfig'
pod 'Firebase/Crashlytics'
pod 'Firebase/Messaging'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Introspect'
pod 'ReachabilitySwift'
pod 'RealmSwift'
pod 'SDWebImageSwiftUI'
pod 'SwiftKeychainWrapper'
pod 'Zip'
end
target 'X' do
shared_pods
pod 'EarlGreyApp'
end
target 'X-UITests' do
inherit! :search_paths
pod 'EarlGreyTest'
pod 'eDistantObject', '0.9.0'
end
我试图取消选中该Find Implicit Dependencies
计划,但仍然出现错误。有什么帮助吗?谢谢。