How to setup android studio for pepperΒΆ
This is a guide on pepper setup for android studio. This guide will show you how to setup android studio for pepper. To start off we will follow the provided guide on the softbank website. This guide will only help with certain parts of the setup
It is important to note that multiple combinations of android studio and pepper sdk can work together. This guide will show you how to setup android studio for pepper sdk with the versions that worked for us.
Installing the Pepper SDK plug-inΒΆ
Install Android StudioΒΆ
To start off you need to install android studio. QiSDK recommends installing the latest stable version (version 3.4 or higher). In this guide we recommend using version 2021.1.1 You can download android studio here. It is recommended to always start up android studio as an administrator. This can be done by right clicking on the android studio icon and selecting Run as administrator
.
Get Android SDK and Build-ToolsΒΆ
Follow the first step on the QiSDK guide. Here are a few pointers to help you with this step:
- Android 6.0 (API level 23) is the minimum version required for the Pepper SDK. But it is not the version that will be used.
- The recommended version is Android 10.0 (API level 29). This is not shown as API 29 but as Android 10.0. This is the version that worked for us.
After this you can follow the rest of the guide on the QiSDK website.
Robot SDK ManagerΒΆ
The option to simulate pepper and the tablet won't work. We have yet to find a solution for this. You can still create a device and run the app on the device. But you won't be able to simulate the robot.
Creating a robot applicationΒΆ
Creating a projectΒΆ
To create a project you need to follow the steps on the QiSDK website. Here are a few pointers to help you with this step:
- Make sure to select a template that works for you. We recommend using the
Empty Activity
template. This will give you a blank project to start with. - Make sure to select
Use legacy android.support libraries
. This will make sure that the project will work with the pepper sdk.
- On step 5 of the guide make sure that the interface looks the following image, if it does not look the same gradle doens't recognize the project as an android project:
Implementing QiSDK Design & the Robot Life CycleΒΆ
On this step the QiSDK guide provides you with a code snippet. This code snippet is used to make the robot do something. But the provided snipped makes use of the pepper library. This library is not included in the guide. To make use of the library you need to add the following line to the settings.gradle
file:
1 2 3 4 5 6 7 8 9 10 |
|
After this you should be able to make use of the pepper library. The imports of classes will show up red to solve this right click the imported class, there will be a option to import the class. Do this for all imports that are red. After this restart android studio and the imports should be fixed.
ConclusionΒΆ
The guide on the QiSDK website is a good guide to follow. But it is not complete. This guide is meant to help you with the parts that are not covered in the QiSDK guide. Once all steps from both guides are followed you should be able to run the app on the robot.