RoboVM错误 - dyld:未加载库

时间:2014-04-01 01:57:08

标签: java ios maven libgdx robovm

我正在尝试使用带有libGDX的RoboVM来运行我的iOS游戏。我的项目是用maven构建的,并使用maven robovm插件在iOS模拟器中测试应用程序。但是,当我尝试运行它时,我收到以下错误:

[ERROR] dyld: Library not loaded: @rpath/iPhoneSimulatorRemoteClient.framework/Versions/A/iPhoneSimulatorRemoteClient
[ERROR]   Referenced from: /Users/<user>/.m2/repository/org/robovm/robovm-dist/0.0.9/unpacked/robovm-0.0.9/bin/ios-sim
[ERROR]   Reason: image not found

我知道这两个问题herehere,但其中一个问题从未得到解答,另一个问题似乎没有解决我的具体错误。

我正在运行以下maven命令来构建和测试项目:

mvn clean integration-test -Pios

我的pom.xml看起来像这样:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>[parent groupid]</groupId>
        <artifactId>[parent artifactid]</artifactId>
        <version>[parent version]</version>
    </parent>

    <artifactId>[artifactid]</artifactId>
    <packaging>jar</packaging>

    <properties>
        <mainClass>[Main Class]</mainClass>
    </properties>

    <dependencies>
        <dependency>
            <groupId>[core groupid]</groupId>
            <artifactId>[core artifactid]</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>com.badlogicgames.gdx</groupId>
            <artifactId>gdx</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>

        <dependency>
            <groupId>com.badlogicgames.gdx</groupId>
            <artifactId>gdx-backend-robovm</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>../assets</directory>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.16</version>
                <configuration>
                    <forkMode>once</forkMode>
                    <argLine>-Djava.library.path=${project.build.directory}/natives/</argLine>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.robovm</groupId>
                <artifactId>robovm-maven-plugin</artifactId>
                <version>0.0.9.1</version>
                <configuration>
                    <config>
                        <mainClass>${mainClass}</mainClass>
                        <os>ios</os>
                        <arch>x86</arch>
                    </config>
                </configuration>
                <executions>
                    <execution>
                        <id>iphone-sim</id>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>iphone-sim</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

有谁知道可能导致此错误的原因是什么?我对OS X和RoboVM都不熟悉,所以我完全不知所措。

1 个答案:

答案 0 :(得分:2)

此问题应在RoboVM 0.0.10中修复。因此,更改您的pom以使用RoboVM Maven插件的0.0.10.1版本,看看是否有所作为。