问题描述:
在自己的已有项目中,集成了cordova框架,并且导入了一些其他插件没有出现异常,但是当我导入cdvfile框架是报错,首先看看cdvfile插件都包含哪些文件:
CDVFile.h
CDVFile.m
CDVLocalFilesystem.h
CDVLocalFilesystem.m
CDVAssetLibraryFilesystem.h
CDVAssetLibraryFilesystem.m
报错信息:
duplicate symbol _kCDVFilesystemURLPrefix in:
/Users/jibrahim/Library/Developer/Xcode/DerivedData/appworks-ios-bvhgmyzzslupqsbrfkdduticdqik/Build/Intermediates/appworks-ios.build/Debug-iphonesimulator/appworks-ios.build/Objects-normal/i386/CDVAssetLibraryFilesystem.o
/Users/jibrahim/Library/Developer/Xcode/DerivedData/appworks-ios-bvhgmyzzslupqsbrfkdduticdqik/Build/Intermediates/appworks-ios.build/Debug-iphonesimulator/appworks-ios.build/Objects-normal/i386/CDVFile.o
......
ld: 4 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
duplicate symbol _kCDVFilesystemURLPrefix in:
重复的符号_kCDVFilesystemURLPrefix在......中.
解决方法:
选择工程,点击project,选择buildSettings,搜索No Commen Blocks,将这个设置为NO即可解决.