How can I create a connection to a myo on Android Studio 3.3

255 Views Asked by At

I want to create a native Android for Android 6.0.1 which works with a Myo gesture controller. But I only find applications which are working gradle build version 1.3.0 and Android Studio 3.3 doesn't support this version any more. I tried different things my app can start and although search for a device, but does not find any myo.

This is the code for the application build.gradle.

buildscript {
    repositories {
         jcenter()
    }
    dependencies {
         classpath 'com.android.tools.build:gradle:2.3.3'    
    }
}

 allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
delete rootProject.buildDir
}

This is the code for the module.

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion '25.0.0'
    defaultConfig {
        applicationId "com.myoenne.enne.myoconnector2"
        minSdkVersion 18
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {

        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23+'
    repositories {
        maven {
            // this must point to the myorepository distributed with the Myo SDK
            url 'C:/Users/EnnE/AndroidStudioProjects/Libraries/myo-android-sdk-0.10.0/myorepository'
        }
    }
    compile 'com.thalmic:myosdk:0.10.0@aar'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    testCompile 'junit:junit:4.12'
}

The apk starts on my Xperia Z3, but when I am searching for a device the myo isn't found.

0

There are 0 best solutions below