RoboVM - 尝试在iOS模拟器上运行时出现不满意的链接错误

时间:2014-04-02 22:50:40

标签: java ios maven libgdx robovm

尝试在iOS模拟器上运行LibGDX和RoboVM项目时,出现以下错误:

[ERROR] Exception in thread "main" java.lang.UnsatisfiedLinkError: 
[ERROR] 
[ERROR] 
[ERROR]     at 
[ERROR] com.badlogic.gdx.backends.iosrobovm.IOSGLES20.init(Native Method)
[ERROR]     at com.badlogic.gdx.backends.iosrobovm.IOSGLES20.<init>(IOSGLES20.java)
[ERROR]     at 
[ERROR] com.badlogic.gdx.backends.iosrobovm.IOSApplication.didFinishLaunching(IOSApplication.java)
[ERROR]     at com.badlogic.gdx.backends.iosrobovm.IOSApplication$Delegate.didFinishLaunching(IOSApplication.java)
[ERROR]     at 
[ERROR] org.robovm.cocoatouch.uikit.UIApplicationDelegate$Callbacks.didFinishLaunching(UIApplicationDelegate.java)
[ERROR]     at org.robovm.cocoatouch.uikit.UIApplication.UIApplicationMain(Native Method)
[ERROR]     at org.robovm.cocoatouch.uikit.UIApplication.main(UIApplication.java)
[ERROR]     at package.ios.Main.main(Main.java)

尽管this question似乎解决了同样的问题,但它的答案仅适用于Eclipse,而我正在使用maven RoboVM插件来构建和运行我的项目。我正在使用这个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>

我不知道可能导致此错误的原因,因为我对RoboVM几乎没有经验。有谁知道我怎么解决它?

0 个答案:

没有答案