在ios中创建静态库时获取lipo错误
我正在创建静态库文件 1.单击项目导航器 2.下一步单击UniversalLib(我给出的Aggreagte名称) 3.构建设置 4.添加构建阶段 5.添加运行脚本,我扩展了运行脚本模块,并编写了以下代码在ios中创建静态库时获取lipo错误,ios,iphone,xcode,Ios,Iphone,Xcode,我正在创建静态库文件 1.单击项目导航器 2.下一步单击UniversalLib(我给出的Aggreagte名称) 3.构建设置 4.添加构建阶段 5.添加运行脚本,我扩展了运行脚本模块,并编写了以下代码 # define output folder environment variable UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal # Step 1. Build Device and Simulator v
# define output folder environment variable
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal
# Step 1. Build Device and Simulator versions
xcodebuild -target ImageFilters ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}"
xcodebuild -target ImageFilters -configuration ${CONFIGURATION} -sdk iphonesimulator -arch i386 BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}"
# make sure the output directory exists
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}"
# Step 2. Create universal binary file using lipo
lipo -create -output "${UNIVERSAL_OUTPUTFOLDER}/lib${PROJECT_NAME}.a" "${BUILD_DIR}/${CONFIGURATION}-iphoneos/lib${PROJECT_NAME}.a" "${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/lib${PROJECT_NAME}.a"
# Last touch. copy the header files. Just for convenience
cp -R "${BUILD_DIR}/${CONFIGURATION}-iphoneos/include" "${UNIVERSAL_OUTPUTFOLDER}/"
6.然后我在“方案选择”下拉列表中选择了聚合目标
7.我收到以下错误
fatal error: lipo: can't open input file: /Users/admin/Library/Developer/Xcode/DerivedData/StaticLibrary-frasjhywfplfpoetbcefljbwhqcd/Build/Products/Debug-iphoneos/libStaticLibrary.a (No such file or directory)
cp: /Users/admin/Library/Developer/Xcode/DerivedData/StaticLibrary-frasjhywfplfpoetbcefljbwhqcd/Build/Products/Debug-iphoneos/include: No such file or directory
有人能帮我解决这个问题吗?我搜索了这么多网站,但没有找到解决这个问题的方法
我按照本教程来做这个例子。。。。
由于lipo无法找到您期望的文件,您能看到“libStaticLibrary.a”的创建位置吗?(或者是否已创建?)路径“/Users/admin/Library/Developer/Xcode/DerivedData/StaticLibrary frasjhywfpplfoetbcefljbwhqcd/Build/Products/Debug iphoneos/”是否存在?实际上,“libStaticLibrary.a”在我的应用程序中是红色的。当我创建自身时,它是红色的。你说是你创建的。它真的被创造了吗?如果是,在哪里?@iworld你有没有找到任何解决方案,我在寻找相同的解决方案?