Smart Device Link development environment setup-hello_sdl execution

This is a development memo. Development environment OS: Ubuntu 16.04

Run sample code (Hello SDL Android)

First, prepare to run Hello SDL Android. ■ The official document supports development by Android studio, so install it first. ■ Start android studio

where bash was deployed/android-studio/bin/studio.sh

Run ■ Add "Expanded location / android-studio / bin" to ~ / .bashrc ■ Download the latest code as a git clone or zip file from git repository. ■ Open the code (sdl_android) you downloaded earlier in android studio ■ Set hello_sdl_android build variant of android studio to tcpDebug ■ Start Manticore of sdl emulator and set port and ip adress. Since the emulator is shared by multiple users, it may be waiting, so use the sdl emulator with docker image. (Hereafter, the explanation when the emulator is started with docker) ■ Create docker container.

docker run -d -p 12345:12345 -p 8080:8080 -p 8087:8087 -p 3001:3001 --name sdl5 hisayan/sdl_core_docker:5.0.0

■ Start emulator (http: // localhost: 8080 /) ■ Change emulator settings using the same procedure as this post ■ Check docker's ip address

sudo docker inspect --format '{{ .NetworkSettings.IPAddress }}'Container ID or container name

■ Changed the code of SDLservice.java of hello_android in android studio

SdlService.java


private static final int TCP_PORT = 12345;
private static final String DEV_MACHINE_IP_ADDRESS = "172.17.0.3";

■ Run the code with Run. When running for the first time in Android studio, you have to set the virtual device (virtual smartphone), so set the virtual devices in order when running run. ■ If you set a virtual device, you can execute it with run, so check that it can be executed as shown in the figure below image.png ■ hello_sdl is created on the app with the emulator opened in the browser, so click it to check it. image.png

References https://qiita.com/masaya3/items/1363213d07b532e5e3af

Recommended Posts

Smart Device Link development environment setup-hello_sdl execution
[Java] Build Java development environment on Ubuntu & check execution
Java development environment
Java development environment memo
Android development link summary
Java development link summary
java development environment construction