当前位置: 首页 > 知识库问答 >
问题:

使用LibGDX IOS在Android Studio中编译时出错

陶英纵
2023-03-14
`[ERROR] Undefined symbols for architecture armv7:
[ERROR]   "std::_Rb_tree_decrement(std::_Rb_tree_node_base*)", referenced from:
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::_Rb_tree_iterator >, std::pair const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::pair const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::_Rb_tree_iterator >, std::pair const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::pair const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::_Rb_tree_iterator >, std::pair const&) in libgdx-bullet.a(User2InternalIndex.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::pair const&) in libgdx-bullet.a(User2InternalIndex.o)
[ERROR]       std::_Rb_tree > >, std::_Select1st > > >, std::less, std::allocator > > > >::_M_insert_unique(std::_Rb_tree_iterator > > >, std::pair > > const&) in libgdx-bullet.a(User2InternalIndex.o)
[ERROR]       ...
[ERROR]   "std::_Rb_tree_increment(std::_Rb_tree_node_base*)", referenced from:
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::_Rb_tree_iterator >, std::pair const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::_Rb_tree_iterator >, std::pair const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       btInverseDynamicsBullet3::User2InternalIndex::buildMapping() in libgdx-bullet.a(User2InternalIndex.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::_Rb_tree_iterator >, std::pair const&) in libgdx-bullet.a(User2InternalIndex.o)
[ERROR]       std::_Rb_tree > >, std::_Select1st > > >, std::less, std::allocator > > > >::_M_insert_unique(std::_Rb_tree_iterator > > >, std::pair > > const&) in libgdx-bullet.a(User2InternalIndex.o)
[ERROR]   "std::string::_Rep::_S_empty_rep_storage", referenced from:
[ERROR]       std::map, std::allocator > >::operator[](int const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::map, std::allocator > >::operator[](std::string const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       btInverseDynamicsBullet3::writeGraphvizDotFile(btInverseDynamicsBullet3::MultiBodyTree const*, btInverseDynamicsBullet3::MultiBodyNameMap const*, char const*) in libgdx-bullet.a(MultiBodyTreeDebugGraph.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_erase(std::_Rb_tree_node >*) in libgdx-bullet.a(extras_wrap.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_erase(std::_Rb_tree_node >*) in libgdx-bullet.a(extras_wrap.o)
[ERROR]   "std::string::assign(std::string const&)", referenced from:
[ERROR]       btInverseDynamicsBullet3::MultiBodyNameMap::addBody(int, std::string const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       btInverseDynamicsBullet3::MultiBodyNameMap::addJoint(int, std::string const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       btInverseDynamicsBullet3::MultiBodyNameMap::getBodyName(int, std::string*) const in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       btInverseDynamicsBullet3::MultiBodyNameMap::getJointName(int, std::string*) const in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]   "std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)", referenced from:
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::_Rb_tree_iterator >, std::pair const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::pair const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::_Rb_tree_iterator >, std::pair const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::pair const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::_Rb_tree_iterator >, std::pair const&) in libgdx-bullet.a(User2InternalIndex.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::pair const&) in libgdx-bullet.a(User2InternalIndex.o)
[ERROR]       std::_Rb_tree > >, std::_Select1st > > >, std::less, std::allocator > > > >::_M_insert_unique(std::_Rb_tree_iterator > > >, std::pair > > const&) in libgdx-bullet.a(User2InternalIndex.o)
[ERROR]       ...
[ERROR]   "std::string::_Rep::_M_destroy(std::allocator const&)", referenced from:
[ERROR]       std::map, std::allocator > >::operator[](int const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::map, std::allocator > >::operator[](std::string const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       btInverseDynamicsBullet3::writeGraphvizDotFile(btInverseDynamicsBullet3::MultiBodyTree const*, btInverseDynamicsBullet3::MultiBodyNameMap const*, char const*) in libgdx-bullet.a(MultiBodyTreeDebugGraph.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_erase(std::_Rb_tree_node >*) in libgdx-bullet.a(extras_wrap.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_erase(std::_Rb_tree_node >*) in libgdx-bullet.a(extras_wrap.o)
[ERROR]   "std::basic_string, std::allocator >::basic_string(std::string const&)", referenced from:
[ERROR]       std::map, std::allocator > >::operator[](int const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::map, std::allocator > >::operator[](std::string const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_create_node(std::pair const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_create_node(std::pair const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR] ld: symbol(s) not found for architecture armv7
[ERROR] clang: error: linker command failed with exit code 1 (use -v to see invocation)
[ERROR] Couldn't create IPA
org.apache.commons.exec.ExecuteException: Command '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -o /var/folders/g8/ngcg1rn95r506xwdly9s9t2r0000gn/T/robovm1251516344287298932.tmp/thumbv7/IOSLauncher -arch armv7 -Wl,-filelist,/var/folders/g8/ngcg1rn95r506xwdly9s9t2r0000gn/T/robovm1251516344287298932.tmp/thumbv7/objects0 -w -L /Users/macUser/.robovm-sdks/robovm-2.3.5/lib/vm/ios/thumbv7 -ObjC -exported_symbols_list /var/folders/g8/ngcg1rn95r506xwdly9s9t2r0000gn/T/robovm1251516344287298932.tmp/thumbv7/exported_symbols -Wl,-no_implicit_dylibs -Wl,-dead_strip -fPIC -miphoneos-version-min=7.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -lrobovm-bc -force_load /Users/macUser/.robovm-sdks/robovm-2.3.5/lib/vm/ios/thumbv7/librobovm-rt.a -lrobovm-core -lgc -lpthread -ldl -lm -lz -liconv -lsqlite3 -framework Foundation -framework UIKit -framework OpenGLES -framework QuartzCore -framework CoreGraphics -framework OpenAL -framework AudioToolbox -framework AVFoundation -force_load /Users/macUser/.robovm/cache/ios/thumbv7/release/Users/macUser/.gradle/caches/modules-2/files-2.1/com.badlogicgames.gdx/gdx-box2d-platform/1.9.8/eb549ac5a5dbb5663eacf782d8cb8f22731638e0/gdx-box2d-platform-1.9.8-natives-ios.jar.extracted/META-INF/robovm/ios/libs/libgdx-box2d.a -force_load /Users/macUser/.robovm/cache/ios/thumbv7/release/Users/macUser/.gradle/caches/modules-2/files-2.1/com.badlogicgames.gdx/gdx-bullet-platform/1.9.8/44de3e9678419ae2a4cfe7fd674b1bf82d56ae20/gdx-bullet-platform-1.9.8-natives-ios.jar.extracted/META-INF/robovm/ios/libs/libgdx-bullet.a -force_load /Users/macUser/.robovm/cache/ios/thumbv7/release/Users/macUser/.gradle/caches/modules-2/files-2.1/com.badlogicgames.gdx/gdx-platform/1.9.8/6e511ad1e19a8c5f792bb149d78c4e7e6f9e828f/gdx-platform-1.9.8-natives-ios.jar.extracted/META-INF/robovm/ios/libs/libgdx.a -force_load /Users/macUser/.robovm/cache/ios/thumbv7/release/Users/macUser/.gradle/caches/modules-2/files-2.1/com.badlogicgames.gdx/gdx-platform/1.9.8/6e511ad1e19a8c5f792bb149d78c4e7e6f9e828f/gdx-platform-1.9.8-natives-ios.jar.extracted/META-INF/robovm/ios/libs/libObjectAL.a -lz -framework MobileCoreServices -Xlinker -sdk_version -Xlinker 12.1 -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:385)
    at org.robovm.compiler.target.AbstractTarget.doBuild(AbstractTarget.java:276)
    at org.robovm.compiler.target.ios.IOSTarget.doBuild(IOSTarget.java:349)
    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:466)
    at org.robovm.compiler.AppCompiler.build(AppCompiler.java:784)
    at org.robovm.idea.compilation.RoboVmCompileTask$1.doCompile(RoboVmCompileTask.java:123)
    at org.robovm.idea.compilation.RoboVmCompilerThread.run(RoboVmCompilerThread.java:66)`

这是我的建筑。格雷德尔:

`buildscript {


    repositories {
        mavenLocal()
        mavenCentral()
        maven { url "https://plugins.gradle.org/m2/" }
        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
        jcenter()
        apply plugin: 'signing'
        google()
    }
    dependencies {
        classpath 'org.wisepersist:gwt-gradle-plugin:1.0.6'
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.3.5'


    }
}

allprojects {
    apply plugin: "eclipse"
    apply plugin: "idea"

    version = '1.0'
    ext {
        appName = "Debt Collector"
        gdxVersion = '1.9.8'
        roboVMVersion = '2.3.5'
        box2DLightsVersion = '1.4'
        ashleyVersion = '1.7.0'
        aiVersion = '1.8.0'
    }

    repositories {
        mavenLocal()
        mavenCentral()
        google()
        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
        maven { url "https://oss.sonatype.org/content/repositories/releases/" }
    }
}

project(":android") {
    apply plugin: "android"

    configurations { natives }

    dependencies {
        implementation project(":core")
        implementation "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64"
        implementation "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-arm64-v8a"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86_64"
        implementation "com.badlogicgames.gdx:gdx-ai:$aiVersion"
        implementation "com.badlogicgames.gdx:gdx-bullet:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-arm64-v8a"
        natives "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-x86"
        natives "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-x86_64"

    }
}


project(":core") {
    apply plugin: "java"


    dependencies {
        implementation "com.badlogicgames.gdx:gdx:$gdxVersion"
        implementation "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
        implementation "com.badlogicgames.gdx:gdx-ai:$aiVersion"
        implementation "io.socket:socket.io-client:1.0.0"
        implementation files("build/libs/kryonet-2.21-all.jar")
        implementation "com.badlogicgames.gdx:gdx-bullet:$gdxVersion"

    }
}

project(":ios") {
    apply plugin: "java"
    apply plugin: "robovm"


    dependencies {
        implementation project(":core")
        implementation "com.mobidevelop.robovm:robovm-rt:$roboVMVersion"
        implementation "com.mobidevelop.robovm:robovm-cocoatouch:$roboVMVersion"
        implementation "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion"
        implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
        implementation "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
        implementation "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-ios"
        implementation "com.badlogicgames.gdx:gdx-bullet:$gdxVersion"
        implementation "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-ios"
        implementation files("build/libs/kryonet-2.21-all.jar")


    }
}

project(":desktop") {
    apply plugin: "java"


    dependencies {
        implementation project(":core")
        implementation "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
        implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
        implementation "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop"
        implementation "com.badlogicgames.gdx:gdx-bullet-platform:1.9.1:natives-desktop"

    }
}

project(":html") {
    apply plugin: "gwt"
    apply plugin: "war"


    dependencies {
        implementation project(":core")
        implementation "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion"
        implementation "com.badlogicgames.gdx:gdx:$gdxVersion:sources"
        implementation "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources"
        implementation "com.badlogicgames.gdx:gdx-box2d:$gdxVersion:sources"
        implementation "com.badlogicgames.gdx:gdx-box2d-gwt:$gdxVersion:sources"
        implementation "com.badlogicgames.gdx:gdx-ai:$aiVersion:sources"

    }
}

tasks.eclipse.doLast {
    delete ".project"
}`

如何使用bullet 1.9.8使用libgdx创建ipa,而不会出现libgdx编译错误?。

共有1个答案

贺山
2023-03-14
project(":ios") {
    apply plugin: "java"
    apply plugin: "robovm"

    dependencies {
        implementation project(":core")
        implementation "com.mobidevelop.robovm:robovm-rt:$roboVMVersion"
        implementation "com.mobidevelop.robovm:robovm-cocoatouch:$roboVMVersion"
        implementation "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion"
        implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
        //remove this line
        //implementation "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-ios"
    }
}
 类似资料:
  • 我在使用汇总编译Vue脚本时遇到问题。我得到的错误是 [!] 错误:节点_modules/vue/dist/vue未导出“openBlock”。运行时。esm。js,由src/js/components/TestButton导入。vue?vue app.js TestButton.vue 卷起来。配置。js 我尝试了很多不同的东西,但似乎没有任何帮助。但是,如果我在配置中的vuePlugin之前加

  • 我想做一个应用程序,使用谷歌翻译API。自从我添加了 我的构建中的依赖项。gradle我有个错误: 现在必须显式声明注释处理器。发现编译类路径上的以下依赖项包含注释处理器。请将它们添加到annotationProcessor配置中。-自动值-1.2。jar(com.google.auto.value:auto-value:1.2)或者,设置android。defaultConfig。javaCom

  • 我已经为Raspberry PI使用了已经编译好的openCV版本。任何感兴趣的人的链接 //usr/local/lib/libopencv_calib3d.so.2.4:未定义对`CV::Mutex::Unlock()'的引用 //usr/local/lib/libopencv_calib3d.so.2.4:未定义对`CV::mutex::lock()‘的引用 //usr/local/lib/l

  • 我想做的是:使用msvc 2010或更高版本编译qt-everywhere_opensource-4.7.3、qwt、qtwtplot3d和qwt极。 我所做的: > 安装Visual Studio C Express 2010 下载代码源文件“qt-无处不在-开源-src-4.7.3” 在"C:\Qt\静态"a中提取zip的内容。小心更改目录的名称。它们必须很短,没有空格。 创建环境变量a.QM

  • 我试图用maven在heroku simple servlet上上传。在本地,我的servlet工作正常,但当我使用: 我得到“构建失败”的错误消息: 我在系统变量中将所有内容都更改为Java 1.7,maven运行的是Java 1.7,javac版本是1.7? 我在这里错过了什么吗? 编辑:我的JAVA_HOME和错误截图

  • 我目前正在尝试将基于Ant的构建过程转移到Gradle。 任务“:CompileJava”执行失败。编译失败;有关详细信息,请参阅编译器错误输出。“ -stacktrace选项不提供其他信息。所以,Gradle编译显示我的代码中有一些错误。但是这个相同的代码(Ant jar任务的jar)目前被20个或更多的其他项目使用,一切都是可以的。 Gradle似乎是一个很棒的构建工具,所以我想理解为什么当我