1

When trying to run a LibGDX and RoboVM project on the iOS simulator, I get the following error:

[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)

Although this question seems to address the same problem, it's answer only works on Eclipse, and I'm using the maven RoboVM plugin to build and run my project. I'm using this maven command to run the project:

mvn clean integration-test -Pios

and my pom.xml looks like this:

<?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>

I have no idea what might be causing this error, as I have little experience with RoboVM. Does anyone know how I might fix it?

Community
  • 1
  • 1
kabb
  • 2,474
  • 2
  • 17
  • 24

0 Answers0