0

I am trying to develop for the NAO robot from aldebaran. Sadly it does not work when I try to execute this piece of code in Java with the following error:

I am using the following JDKs:

  • java-naoqi-sdk-2.5.6.5-win32-vs2013.jar
  • jdk1.8.0_281
import com.aldebaran.qi.Application;
import com.aldebaran.qi.helper.proxies.ALTextToSpeech;

public class Main {

    public static void main(String[] args) throws Exception {
        String robotUrl = "tcp://nao.local:9559";
        // Create a new application
        Application application = new Application(args, robotUrl);
        // Start your application
        application.start();
        // Create an ALTextToSpeech object and link it to your current session
        ALTextToSpeech tts = new ALTextToSpeech(application.session());
        // Make your robot say something
        tts.say("Hello World!");
    }
}

Error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\lucas\AppData\Local\Temp\qi.dll: %1 is not a valid Win32 application
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1934)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1817)
    at java.lang.Runtime.load0(Runtime.java:810)
    at java.lang.System.load(System.java:1086)
    at com.aldebaran.qi.SharedLibrary.extractAndLoad(SharedLibrary.java:133)
    at com.aldebaran.qi.SharedLibrary.loadLibHelper(SharedLibrary.java:72)
    at com.aldebaran.qi.SharedLibrary.loadLib(SharedLibrary.java:34)
    at com.aldebaran.qi.EmbeddedTools.loadEmbeddedLibraries(EmbeddedTools.java:138)
    at com.aldebaran.qi.Application.<clinit>(Application.java:16)
    at Main.main(Main.java:9)

Process finished with exit code 1

Does anyone know how to fix this?

It should be compiling and it should connect to the robot.

0 Answers0