起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5666|回复: 8

[处理中] 自定义cordova插件引入第三方库后打包出错,找不到第三方库。求解答,谢谢!!!

[复制链接]

2

主题

10

帖子

38

积分

新手上路

Rank: 1

积分
38
QQ
发表于 2016-12-26 16:29:09 | 显示全部楼层 |阅读模式
        ** BUILD FAILED **
      
      
      The following build commands failed:
              CompileC build/BLE_Test3.build/Debug-iphoneos/BLE_Test3.build/Objects-normal/armv7/BLECentralPlugin.o BLE_Test3/Plugins/com.hy.cordova.plugin.bleTest1/BLECentralPlugin/BLECentralPlugin.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
      (1 failure)
      Error code 65 for command: xcodebuild with args: -xcconfig,/Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/cordova/build-debug.xcconfig,-project,BLE_Test3.xcodeproj,ARCHS=armv7 arm64,-target,BLE_Test3,-configuration,Debug,-sdk,iphoneos,build,VALID_ARCHS=armv7 arm64,CONFIGURATION_BUILD_DIR=/Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/sharedpch
      ERROR building one of the platforms: Error: /Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/cordova/build: Command failed with exit code 2
      You may not have the required environment or OS to build this project
      Error: /Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/cordova/build: Command failed with exit code 2
   ****ERROR****: 子任务 "exec" 执行失败。
   ****ERROR****: 任务 "buildIOS" 执行失败。
   ****ERROR****: 执行出错:
   ****ERROR****: 错误信息: exec returned: 1
   ****ERROR****: 如不能确定具体问题,可参考常见问题: http://bbs.wex5.com/thread-82002-1-1.html
   /var/folders/wd/_yzcjd8138j0yfgdl51bbhtr0000gn/T/448969dc-b56f-469f-b3ff-9738c3852178/pack.xml:118: exec returned: 1
           at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:643)
           at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:669)
           at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:495)
           at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
           at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:497)
           at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
           at org.apache.tools.ant.Task.perform(Task.java:348)
           at org.apache.tools.ant.Target.execute(Target.java:435)
           at org.apache.tools.ant.Target.performTasks(Target.java:456)
           at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
           at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
           at com.justep.deploy.app.utils.BuildHelper.execTask(Unknown Source)
           at com.justep.deploy.app.utils.Builder.main(Unknown Source)
****ERROR****: 子任务 "java" 执行失败。
****ERROR****: 任务 "pack" 执行失败。
****ERROR****: 执行出错:
****ERROR****: 错误信息: Java returned: 253
****ERROR****: 如不能确定具体问题,可参考常见问题: http://bbs.wex5.com/thread-82002-1-1.html

2

主题

10

帖子

38

积分

新手上路

Rank: 1

积分
38
QQ
 楼主| 发表于 2016-12-26 16:30:02 | 显示全部楼层
部分错误信息:
/Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/BLE_Test3/Plugins/com.hy.cordova.plugin.bleTest1/BLECentralPlugin/BLECentralPlugin.m:11:9: fatal error: 'CSRmesh/MeshServiceApi.h' file not found
      #import <CSRmesh/MeshServiceApi.h>
              ^
      1 error generated.
      
      CompileC build/BLE_Test3.build/Debug-iphoneos/BLE_Test3.build/Objects-normal/armv7/CBPeripheral+Extensions.o BLE_Test3/Plugins/com.hy.cordova.plugin.bleTest1/BLECentralPlugin/CBPeripheral+Extensions.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
          cd /Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios
          export LANG=en_US.US-ASCII
          export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/Users/heyun/Desktop/wex5/WeX5_V3.6-mac/node:/var/folders/wd/_yzcjd8138j0yfgdl51bbhtr0000gn/T/448969dc-b56f-469f-b3ff-9738c3852178/java/jdk1.8-x64/Contents/Home/bin:/Users/heyun/.rvm/gems/ruby-2.2.0/bin:/Users/heyun/.rvm/gems/ruby-2.2.0@global/bin:/Users/heyun/.rvm/rubies/ruby-2.2.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/heyun/.rvm/bin"
          /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c99 -fobjc-arc -gmodules -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=6.0 -g -fvisibility=hidden -Wno-sign-conversion -iquote /Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/BLE_Test3.build/Debug-iphoneos/BLE_Test3.build/BLE_Test3-generated-files.hmap -I/Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/BLE_Test3.build/Debug-iphoneos/BLE_Test3.build/BLE_Test3-own-target-headers.hmap -I/Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/BLE_Test3.build/Debug-iphoneos/BLE_Test3.build/BLE_Test3-all-target-headers.hmap -iquote /Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/BLE_Test3.build/Debug-iphoneos/BLE_Test3.build/BLE_Test3-project-headers.hmap -I/Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/device/include -I/Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/device/usr/local/lib/include -I/Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/UninstalledProducts/include -I/Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/device -I/Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/BLE_Test3.build/Debug-iphoneos/BLE_Test3.build/DerivedSources/armv7 -I/Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/BLE_Test3.build/Debug-iphoneos/BLE_Test3.build/DerivedSources -F/Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/device -include /Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/sharedpch/BLE_Test3-Prefix-dqqwpfdynlricscejxhzohirwfbx/BLE_Test3-Prefix.pch -MMD -MT dependencies -MF /Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/BLE_Test3.build/Debug-iphoneos/BLE_Test3.build/Objects-normal/armv7/CBPeripheral+Extensions.d --serialize-diagnostics /Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/BLE_Test3.build/Debug-iphoneos/BLE_Test3.build/Objects-normal/armv7/CBPeripheral+Extensions.dia -c /Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/BLE_Test3/Plugins/com.hy.cordova.plugin.bleTest1/BLECentralPlugin/CBPeripheral+Extensions.m -o /Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/BLE_Test3.build/Debug-iphoneos/BLE_Test3.build/Objects-normal/armv7/CBPeripheral+Extensions.o
      
      CompileC build/BLE_Test3.build/Debug-iphoneos/BLE_Test3.build/Objects-normal/armv7/BLECommandContext.o BLE_Test3/Plugins/com.hy.cordova.plugin.bleTest1/BLECentralPlugin/BLECommandContext.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
          cd /Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios
          export LANG=en_US.US-ASCII
          export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/Users/heyun/Desktop/wex5/WeX5_V3.6-mac/node:/var/folders/wd/_yzcjd8138j0yfgdl51bbhtr0000gn/T/448969dc-b56f-469f-b3ff-9738c3852178/java/jdk1.8-x64/Contents/Home/bin:/Users/heyun/.rvm/gems/ruby-2.2.0/bin:/Users/heyun/.rvm/gems/ruby-2.2.0@global/bin:/Users/heyun/.rvm/rubies/ruby-2.2.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/heyun/.rvm/bin"
          /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c99 -fobjc-arc -gmodules -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=6.0 -g -fvisibility=hidden -Wno-sign-conversion -iquote /Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/BLE_Test3.build/Debug-iphoneos/BLE_Test3.build/BLE_Test3-generated-files.hmap -I/Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/BLE_Test3.build/Debug-iphoneos/BLE_Test3.build/BLE_Test3-own-target-headers.hmap -I/Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/BLE_Test3.build/Debug-iphoneos/BLE_Test3.build/BLE_Test3-all-target-headers.hmap -iquote /Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/BLE_Test3.build/Debug-iphoneos/BLE_Test3.build/BLE_Test3-project-headers.hmap -I/Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/device/include -I/Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/device/usr/local/lib/include -I/Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/UninstalledProducts/include -I/Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/device -I/Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/BLE_Test3.build/Debug-iphoneos/BLE_Test3.build/DerivedSources/armv7 -I/Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/BLE_Test3.build/Debug-iphoneos/BLE_Test3.build/DerivedSources -F/Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/device -include /Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/sharedpch/BLE_Test3-Prefix-dqqwpfdynlricscejxhzohirwfbx/BLE_Test3-Prefix.pch -MMD -MT dependencies -MF /Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/BLE_Test3.build/Debug-iphoneos/BLE_Test3.build/Objects-normal/armv7/BLECommandContext.d --serialize-diagnostics /Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/BLE_Test3.build/Debug-iphoneos/BLE_Test3.build/Objects-normal/armv7/BLECommandContext.dia -c /Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/BLE_Test3/Plugins/com.hy.cordova.plugin.bleTest1/BLECentralPlugin/BLECommandContext.m -o /Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/build/BLE_Test3.build/Debug-iphoneos/BLE_Test3.build/Objects-normal/armv7/BLECommandContext.o
   
回复 支持 反对

使用道具 举报

1

主题

6163

帖子

2095

积分

金牌会员

Rank: 6Rank: 6

积分
2095
QQ
发表于 2016-12-26 16:38:40 | 显示全部楼层
Rhine 发表于 2016-12-26 16:30
部分错误信息:
/Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/io ...

打ios包的时候报的错吗?
不引入的时候是可以打包的吗?
可不可以发一个完整的报错日志啊?
回复 支持 反对

使用道具 举报

2

主题

10

帖子

38

积分

新手上路

Rank: 1

积分
38
QQ
 楼主| 发表于 2016-12-26 16:52:52 | 显示全部楼层
半导体 发表于 2016-12-26 16:38
打ios包的时候报的错吗?
不引入的时候是可以打包的吗?
可不可以发一个完整的报错日志啊?

用wex5工具打iOS包出错的。
这个自定义插件是在官方cordova的蓝牙插件的基础上做了修改,引入了第三方类库后在代码上做了部分修改。引入官方蓝牙插件打包没有问题。

回复 支持 反对

使用道具 举报

2

主题

10

帖子

38

积分

新手上路

Rank: 1

积分
38
QQ
 楼主| 发表于 2016-12-26 17:10:35 | 显示全部楼层
半导体 发表于 2016-12-26 16:38
打ios包的时候报的错吗?
不引入的时候是可以打包的吗?
可不可以发一个完整的报错日志啊?

完整错误日志

完整错误日志.rar

39.29 KB, 下载次数: 147

完整错误日志

回复 支持 反对

使用道具 举报

3

主题

304

帖子

798

积分

高级会员

Rank: 4

积分
798
QQ
发表于 2016-12-27 10:43:05 | 显示全部楼层
  /Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/BLE_Test3/Plugins/com.hy.cordova.plugin.bleTest1/BLECentralPlugin/BLECentralPlugin.m:11:9: fatal error: 'CSRmesh/MeshServiceApi.h' file not found
      #import <CSRmesh/MeshServiceApi.h>
检查一下这个文件BLECentralPlugin.m里面import
回复 支持 反对

使用道具 举报

2

主题

10

帖子

38

积分

新手上路

Rank: 1

积分
38
QQ
 楼主| 发表于 2016-12-27 14:47:02 | 显示全部楼层
jleeh 发表于 2016-12-27 10:43
  /Users/heyun/Desktop/wex5/WeX5_V3.6-mac/model/Native/BLE_Test3/build/src/platforms/ios/BLE_Test3 ...

谢谢回答。打包之前是导入的,报错的这个文件是CSRmesh.framework库中的一个文件。打包出错之后,再用xcode打开iOS源码工程,import的这个文件说找不到,同时第三方库也变成了红色。file:///C:\Users\3\AppData\Roaming\Tencent\Users\790840451\QQ\WinTemp\RichOle\IW(FJUOEQS84WP)}7_R3ERK.png
file:///C:\Users\3\AppData\Roaming\Tencent\Users\790840451\QQ\WinTemp\RichOle\IW(FJUOEQS84WP)}7_R3ERK.png


回复 支持 反对

使用道具 举报

3

主题

304

帖子

798

积分

高级会员

Rank: 4

积分
798
QQ
发表于 2016-12-27 16:28:45 | 显示全部楼层
红色代表没有,或者是文件错误,如果是文件错误,你可以在mac os上用相关工具打开该文件,然后保存一下就行
回复 支持 反对

使用道具 举报

2

主题

10

帖子

38

积分

新手上路

Rank: 1

积分
38
QQ
 楼主| 发表于 2016-12-27 20:02:19 | 显示全部楼层
jleeh 发表于 2016-12-27 16:28
红色代表没有,或者是文件错误,如果是文件错误,你可以在mac os上用相关工具打开该文件,然后保存一下就行 ...

谢谢回复。菜鸟一枚,可以推荐一下有什么可以打开第三方库的工具吗。还有一点奇怪的是,xcode内删除红色的第三方库并重新添加后,直接编译,在真机上可以成功运行。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2025-3-14 19:16 , Processed in 0.062642 second(s), 27 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表