Reputation: 2227
It was asked here Running error using javafx ports but no useful answer was given
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':androidInstall'. > com.android.builder.testing.api.DeviceException: java.lang.RuntimeException: No connected devices!
if needed here is the build file:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.3.2'
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.4'
}
}
apply plugin: 'org.javafxports.jfxmobile'
jfxmobile {
downConfig {
version = '3.0.0'
plugins 'display', 'lifecycle', 'statusbar', 'storage'
}
android {
compileSdkVersion = 23
manifest = 'src/android/AndroidManifest.xml'
}
ios {
infoPList = file('src/ios/Default-Info.plist')
forceLinkClasses = [
'com.gluonhq.**.*',
'javax.annotations.**.*',
'javax.inject.**.*',
'javax.json.**.*',
'org.glassfish.json.**.*'
]
}
}
apply plugin: 'com.github.johnrengelman.shadow'
shadowJar {
configurations = [project.configurations.desktopRuntime]
}
apply plugin: 'eclipse'
repositories {
jcenter()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
mainClassName = 'main.GluonApplication'
dependencies {
compile 'com.gluonhq:charm:4.0.1'
compileOnly "org.projectlombok:lombok:1.16.10"
}
The device is an Xperia Z5 compact with Android 6.0. Windows 10 shows device as connected and i can access its folder in the explorer.
Don't know if i need some kind of driver or what.
Upvotes: 0
Views: 2496
Reputation: 45476
"No connected devices" error usually means that you don't have enabled on your device the developer options.
To do so, just go to Settings -> About phone. Scroll down to the bottom and find the Build number. Tap the Build number field seven times to enable developer options. At the end, you’ll see the message "You are now a developer!".
Once you have it done, go to the new option Settings -> Developer Options, scroll down to the Debugging section, and enable the "USB Debugging" switch. The first time you plug your device into a computer you will be promoted to allow USB debugging. If you are in your development machine, mark the checkbox so it won't ask you again.
Also, it is recommended that you authorize the installation of apk's from unknown sources, in Settings -> Security.
Now connect again your device to the USB port of your machine, open a terminal and go to the android SDK folder, enter platform-tools directory and run adb devices
. You should see your device listed.
In that case, you can run gradlew androidInstall
again.
Upvotes: 5