Myo Sample not working in Android Studio

by robotgirl

Myo Sample not working in Android Studio


I am using the Myo Android SDK from the Myo website. I have followed all the instructions and am trying to run the sample HelloWorld code. However, I am unable to run it because I get the error “Couldn't initialize Hub”

I'm running this code in Android Studio on the Nexus 5X Virtual Device with API version 25.

I think that this line of code in the Sample HelloWorld is causing the issue:

Hub hub = Hub.getInstance();
if (!hub.init(this, getPackageName())) {
// We can't do anything with the Myo device if the Hub can't be initialized, so exit.
Toast.makeText(this, “Couldn't initialize Hub”, Toast.LENGTH_SHORT).show();

Does anyone have any suggestions for how to solve this? I somehow need to initialize the Myo armband in Android Studio, but am not very sure of how to do this.
Moderator control