在MacBook上的Eclipse中使用示例codenameone项目构建iOS期间的另一个错误

2lpgd968  于 2023-01-25  发布在  Eclipse
关注(0)|答案(1)|浏览(108)

感谢Shai和Steve的帮助,我在Eclipse中构建iOS Xcode项目方面取得了进展。(无法使用示例codenameone项目在Eclipse中构建iOS Xcode项目)和JDK 11(Cannot run program "xcodebuild" in Eclipse on MacBook using the example codenameone project),我的构建在稍后阶段失败。我在下面发布了堆栈跟踪,虽然我不确定失败的原因。一个信息行说:"无法修复xcode项目方案。请确保您安装了cocoapods"。我做了"brew list cocoapods",看到版本1. 11. 3_1安装在/usr/local/Cellar/cocoapods。该行上面的信息行表明,重复尝试chmod特定文件(/Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/hooks/fix_xcode_schemes. rb)失败。但是,当我进入/Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/并在构建过程中查看其内容时,我看到在那个目录下创建了子目录,然后删除了,但是没有看到"hooks"子目录。我不知道如何进一步调试。
谢谢你的帮助。

[[1;34mINFO[m] Parsing: /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/classes/com/codename1/media/RemoteControlCallback$6.class

[[1;34mINFO[m] Parsing: /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/classes/com/codename1/media/AbstractMedia.class

[[1;34mINFO[m] Parsing: /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/classes/com/codename1/media/RemoteControlCallback$4.class

[[1;34mINFO[m] Parsing: /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/classes/com/codename1/media/MediaManager.class

[[1;34mINFO[m] Parsing: /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/classes/com/codename1/media/AbstractMedia$2StateChangeListener.class
[[1;34mINFO[m] 
Parsing: /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/classes/com/codename1/media/AudioBuffer$1.class

[[1;34mINFO[m] Rewrite /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/dist/MyCNOApp-src/cn1_globals.h with 1 changes

[[1;34mINFO[m] outputDirectory is: /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/dist/MyCNOApp-src
[[1;34mINFO[m] 

[[1;34mINFO[m] 43 native files

[[1;34mINFO[m] Native files total 1035K

[[1;34mINFO[m] Optimizer On: Removing unused methods and classes...

[[1;34mINFO[m] cullClasses()

[[1;34mINFO[m] cullClasses()

[[1;34mINFO[m] cullClasses()

[[1;34mINFO[m] cullClasses()

[[1;34mINFO[m] cullClasses()
unusued Method cull removed 5729 methods in 30 seconds

[[1;34mINFO[m] Rewrite /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/dist/MyCNOApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata with 1 changes

[[1;34mINFO[m] Rewrite /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/dist/MyCNOApp.xcodeproj/project.pbxproj with 60 changes

[[1;34mINFO[m] Rewrite /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/dist/MyCNOApp-src/MyCNOApp-Info.plist with 5 changes

[[1;34mINFO[m] Process return code is 0
[[1;34mINFO[m] Executing: 
[[1;34mINFO[m] echo chmod 0755 /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/hooks/fix_xcode_schemes.rb 
[[1;34mINFO[m] Executing with timeout -1
[[1;34mINFO[m] chmod 0755 /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/hooks/fix_xcode_schemes.rb

[[1;34mINFO[m] Process return code is 0
[[1;34mINFO[m] Executing: 
[[1;34mINFO[m] chmod 0755 /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/hooks/fix_xcode_schemes.rb 
[[1;34mINFO[m] Executing with timeout -1
[[1;34mINFO[m] Process return code is 0
[[1;34mINFO[m] Executing: 
[[1;34mINFO[m] echo /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/hooks/fix_xcode_schemes.rb 
[[1;34mINFO[m] Executing with timeout -1
[[1;34mINFO[m] /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/hooks/fix_xcode_schemes.rb

[[1;34mINFO[m] Process return code is 0
[[1;34mINFO[m] Executing: 
[[1;34mINFO[m] /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/hooks/fix_xcode_schemes.rb 
[[1;34mINFO[m] Executing with timeout -1
[[1;34mINFO[m] /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- xcodeproj (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/hooks/fix_xcode_schemes.rb:2:in `<main>'

[[1;34mINFO[m] Process return code is 1
[[1;34mINFO[m] Failed to fix xcode project schemes. Make sure you have Cocoapods installed. 
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;34mINFO[m] [1mReactor Summary for mycnoapp 1.0-SNAPSHOT:[m
[[1;34mINFO[m] 
[[1;34mINFO[m] mycnoapp ........................................... [1;32mSUCCESS[m [ 0.010 s]
[[1;34mINFO[m] mycnoapp-common .................................... [1;32mSUCCESS[m [ 7.675 s]
[[1;34mINFO[m] mycnoapp-ios ....................................... [1;31mFAILURE[m [ 54.198 s]
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;34mINFO[m] [1;31mBUILD FAILURE[m
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;34mINFO[m] Total time: 01:02 min
[[1;34mINFO[m] Finished at: 2023-01-23T16:51:42-05:00
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;31mERROR[m] Failed to execute goal [32mcom.codenameone:codenameone-maven-plugin:7.0.86:build[m [1m(build-ios)[m on project [36mmycnoapp-ios[m: [1;31miOS build failed[m -> [1m[Help 1][m
[1;31morg.apache.maven.lifecycle.LifecycleExecutionException[m: [1;31mFailed to execute goal [32mcom.codenameone:codenameone-maven-plugin:7.0.86:build[m [1m(build-ios)[m on project [36mmycnoapp-ios[m: [1;31miOS build failed[m[m
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 ([1mMojoExecutor.java:375[m)
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.doExecute ([1mMojoExecutor.java:351[m)
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.execute ([1mMojoExecutor.java:215[m)
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.execute ([1mMojoExecutor.java:171[m)
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.execute ([1mMojoExecutor.java:163[m)
[1mat[m org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject ([1mLifecycleModuleBuilder.java:117[m)
[1mat[m org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject ([1mLifecycleModuleBuilder.java:81[m)
[1mat[m org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build ([1mSingleThreadedBuilder.java:56[m)
[1mat[m org.apache.maven.lifecycle.internal.LifecycleStarter.execute ([1mLifecycleStarter.java:128[m)
[1mat[m org.apache.maven.DefaultMaven.doExecute ([1mDefaultMaven.java:294[m)
[1mat[m org.apache.maven.DefaultMaven.doExecute ([1mDefaultMaven.java:192[m)
[1mat[m org.apache.maven.DefaultMaven.execute ([1mDefaultMaven.java:105[m)
[1mat[m org.apache.maven.cli.MavenCli.execute ([1mMavenCli.java:960[m)
[1mat[m org.apache.maven.cli.MavenCli.doMain ([1mMavenCli.java:293[m)
[1mat[m org.apache.maven.cli.MavenCli.main ([1mMavenCli.java:196[m)
[1mat[m jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 ([1mNative Method[m)
[1mat[m jdk.internal.reflect.NativeMethodAccessorImpl.invoke ([1mNativeMethodAccessorImpl.java:62[m)
[1mat[m jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke ([1mDelegatingMethodAccessorImpl.java:43[m)
[1mat[m java.lang.reflect.Method.invoke ([1mMethod.java:566[m)
[1mat[m org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced ([1mLauncher.java:282[m)
[1mat[m org.codehaus.plexus.classworlds.launcher.Launcher.launch ([1mLauncher.java:225[m)
[1mat[m org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode ([1mLauncher.java:406[m)
[1mat[m org.codehaus.plexus.classworlds.launcher.Launcher.main ([1mLauncher.java:347[m)
[1mCaused by[m: org.apache.maven.plugin.MojoExecutionException: [1;31miOS build failed[m
[1mat[m com.codename1.maven.CN1BuildMojo.doIOSLocalBuild ([1mCN1BuildMojo.java:1016[m)
[1mat[m com.codename1.maven.CN1BuildMojo.createAntProject ([1mCN1BuildMojo.java:564[m)
[1mat[m com.codename1.maven.CN1BuildMojo.executeImpl ([1mCN1BuildMojo.java:116[m)
[1mat[m com.codename1.maven.AbstractCN1Mojo.execute ([1mAbstractCN1Mojo.java:195[m)
[1mat[m org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo ([1mDefaultBuildPluginManager.java:137[m)
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 ([1mMojoExecutor.java:370[m)
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.doExecute ([1mMojoExecutor.java:351[m)
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.execute ([1mMojoExecutor.java:215[m)
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.execute ([1mMojoExecutor.java:171[m)
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.execute ([1mMojoExecutor.java:163[m)
[1mat[m org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject ([1mLifecycleModuleBuilder.java:117[m)
[1mat[m org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject ([1mLifecycleModuleBuilder.java:81[m)
[1mat[m org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build ([1mSingleThreadedBuilder.java:56[m)
[1mat[m org.apache.maven.lifecycle.internal.LifecycleStarter.execute ([1mLifecycleStarter.java:128[m)
[1mat[m org.apache.maven.DefaultMaven.doExecute ([1mDefaultMaven.java:294[m)
[1mat[m org.apache.maven.DefaultMaven.doExecute ([1mDefaultMaven.java:192[m)
[1mat[m org.apache.maven.DefaultMaven.execute ([1mDefaultMaven.java:105[m)
[1mat[m org.apache.maven.cli.MavenCli.execute ([1mMavenCli.java:960[m)
[1mat[m org.apache.maven.cli.MavenCli.doMain ([1mMavenCli.java:293[m)
[1mat[m org.apache.maven.cli.MavenCli.main ([1mMavenCli.java:196[m)
[1mat[m jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 ([1mNative Method[m)
[1mat[m jdk.internal.reflect.NativeMethodAccessorImpl.invoke ([1mNativeMethodAccessorImpl.java:62[m)
[1mat[m jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke ([1mDelegatingMethodAccessorImpl.java:43[m)
[1mat[m java.lang.reflect.Method.invoke ([1mMethod.java:566[m)
[1mat[m org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced ([1mLauncher.java:282[m)
[1mat[m org.codehaus.plexus.classworlds.launcher.Launcher.launch ([1mLauncher.java:225[m)
[1mat[m org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode ([1mLauncher.java:406[m)
[1mat[m org.codehaus.plexus.classworlds.launcher.Launcher.main ([1mLauncher.java:347[m)
[[1;31mERROR[m] 
[[1;31mERROR[m] 
[[1;31mERROR[m] For more information about the errors and possible solutions, please read the following articles:
[[1;31mERROR[m] [1m[Help 1][m http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[[1;31mERROR[m] 
[[1;31mERROR[m] After correcting the problems, you can resume the build with the command
[[1;31mERROR[m] [1mmvn <args> -rf :mycnoapp-ios[m

我在Eclipse中对代码名为one的示例项目"构建iOS Xcode项目",遇到的第一个错误是"无法在项目mycnoapp-ios上执行目标com. codenameone:codenameone-maven-plugin:7.0.86:build(build-ios):iOS构建失败"。

xqkwcwgp

xqkwcwgp1#

您需要安装cocoapods,例如使用:

sudo gem install cocoapods

在命令行中。

相关问题