当我尝试在ios设备上构建roboVM / libgdx应用程序时,看到以下错误。
[ERROR] 13:49:29.414 Undefined symbols for architecture arm64:
[ERROR] 13:49:29.414 "_OBJC_CLASS_$_GADInterstitial", referenced from:
[ERROR] 13:49:29.415 objc-class-ref in libGGLAdMob.a(GGLContext+AdMob.o)
[ERROR] 13:49:29.721 "_OBJC_CLASS_$_GADBannerView", referenced from:
[ERROR] 13:49:29.722 objc-class-ref in libGGLAdMob.a(GGLContext+AdMob.o)
[ERROR] 13:49:30.362 ld: symbol(s) not found for architecture arm64
[ERROR] 13:49:30.458 clang: error: linker command failed with exit code 1 (use -v to see invocation)
[ERROR] Couldn't compile app
org.apache.commons.exec.ExecuteException: Command '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -o /Users/gag/StudioProjects/OlympusNew/ios/robovm-build/tmp/iOS/ios/arm64/IsoGameLauncher -arch arm64 -Wl,-filelist,/Users/gag/StudioProjects/OlympusNew/ios/robovm-build/tmp/iOS/ios/arm64/objects0 -w -L /Users/gag/.robovm-sdks/robovm-2.3.6/lib/vm/ios/arm64 -ObjC -Xlinker -alias_list -Xlinker /Users/gag/StudioProjects/OlympusNew/ios/robovm-build/tmp/iOS/ios/arm64/aliased_symbols -exported_symbols_list /Users/gag/StudioProjects/OlympusNew/ios/robovm-build/tmp/iOS/ios/arm64/exported_symbols -Wl,-no_implicit_dylibs -Wl,-dead_strip -F/Users/gag/StudioProjects/OlympusNew/ios/libs -fPIC -miphoneos-version-min=10.3 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -lrobovm-bc -force_load /Users/gag/.robovm-sdks/robovm-2.3.6/lib/vm/ios/arm64/librobovm-rt.a -lrobovm-debug -lrobovm-core -lgc -lpthread -ldl -lm -lz -liconv -lsqlite3 -framework Foundation -framework GoogleMobileAds -framework AdSupport -framework AudioToolbox -framework AVFoundation -framework CFNetwork -framework CoreGraphics -framework CoreMedia -framework CoreMotion -framework CoreTelephony -framework CoreVideo -framework Foundation -framework GLKit -framework JavaScriptCore -framework MediaPlayer -framework MessageUI -framework MobileCoreServices -framework OpenGLES -framework QuartzCore -framework SafariServices -framework Security -framework StoreKit -framework SystemConfiguration -framework UIKit -framework WebKit -framework Crashlytics -framework FBSDKShareKit -framework FBAudienceNetwork -framework Fabric -framework OpenAL -framework GameKit -framework FBSDKLoginKit -framework Bolts -framework FBSDKCoreKit -framework CoreData -framework FIRAnalyticsConnector -framework FirebaseAnalytics -framework FirebaseCore -framework FirebaseCoreDiagnostics -framework FirebaseInstanceID -framework GoogleAppMeasurement -framework GoogleUtilities -framework nanopb -weak_framework AdSupport -weak_framework StoreKit -force_load /Users/gag/.robovm/cache/ios/arm64/release/Users/gag/.gradle/caches/modules-2/files-2.1/com.mobidevelop.robovm/robopods-google-mobile-ads-ios/2.2.3-SNAPSHOT/cf3d14807dc3dfef4aa97bfa2143ee7aa7e83cb2/robopods-google-mobile-ads-ios-2.2.3-SNAPSHOT.jar.extracted/META-INF/robovm/ios/libs/libGGLAdMob.a -lz -lc++ -lxml2 -force_load /Users/gag/.robovm/cache/ios/arm64/release/Users/gag/.gradle/caches/modules-2/files-2.1/com.badlogicgames.gdx/gdx-freetype-platform/1.9.9/dc1091250035b61475c7b70e1ae79c1ffebea5d3/gdx-freetype-platform-1.9.9-natives-ios.jar.extracted/META-INF/robovm/ios/libs/libgdx-freetype.a -force_load /Users/gag/.robovm/cache/ios/arm64/release/Users/gag/.gradle/caches/modules-2/files-2.1/com.badlogicgames.gdx/gdx-platform/1.9.9/fa88e13e767400ddf50c9ad96d78fcebf583b697/gdx-platform-1.9.9-natives-ios.jar.extracted/META-INF/robovm/ios/libs/libgdx.a -force_load /Users/gag/.robovm/cache/ios/arm64/release/Users/gag/.gradle/caches/modules-2/files-2.1/com.badlogicgames.gdx/gdx-platform/1.9.9/fa88e13e767400ddf50c9ad96d78fcebf583b697/gdx-platform-1.9.9-natives-ios.jar.extracted/META-INF/robovm/ios/libs/libObjectAL.a -lsqlite3 -force_load /Users/gag/.robovm/cache/ios/arm64/release/Users/gag/.gradle/caches/modules-2/files-2.1/com.mobidevelop.robovm/robopods-google-apis-ios/2.2.3-SNAPSHOT/7224875ace65e987680c0d36b919bce7f97a8d3c/robopods-google-apis-ios-2.2.3-SNAPSHOT.jar.extracted/META-INF/robovm/ios/libs/libGGLCore.a -Xlinker -sdk_version -Xlinker 12.2 -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks' failed (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:346)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:149)
at org.robovm.compiler.util.Executor.exec(Executor.java:344)
at org.robovm.compiler.util.ToolchainUtil.link(ToolchainUtil.java:404)
at org.robovm.compiler.target.AbstractTarget.doBuild(AbstractTarget.java:276)
at org.robovm.compiler.target.ios.IOSTarget.doBuild(IOSTarget.java:361)
at org.robovm.compiler.target.AbstractTarget.build(AbstractTarget.java:270)
at org.robovm.compiler.Linker.link(Linker.java:433)
at org.robovm.compiler.AppCompiler.compile(AppCompiler.java:514)
at org.robovm.compiler.AppCompiler.build(AppCompiler.java:953)
at org.robovm.idea.compilation.RoboVmCompileTask$4.doCompile(RoboVmCompileTask.java:300)
at org.robovm.idea.compilation.RoboVmCompilerThread.run(RoboVmCompilerThread.java:66)```
但是,我昨天可以运行它,但是在删除笔记本电脑并下载所有软件并再次检出项目后,我开始看到此错误。
有什么建议吗?
谢谢。
最佳答案
最后,我发现了问题。
GoogleMobileAds.framework为140 MB,并且在签出后已损坏,大小为40 kb。因此,我从git存储库中手动下载了它,并用损坏的替换。一切都再次像魅力。
关于java - 体系结构arm64的 undefined symbol :无法构建RoboVM/LibGDX项目,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/55415107/