2016-11-29 87 views
1

我試圖在模擬器或我的設備上運行我的應用程序。當我點擊在Android Studio中的頂部的「運行」按鈕,應用程序沒有運行,但只列出以下信息:Android Studio不提示運行設備

/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/bin/java "-Dgradle.home=/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1" -Dtools.jar=/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/lib/tools.jar -Didea.launcher.port=7533 "-Didea.launcher.bin.path=/Applications/Android Studio.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/groovy-all-2.4.4.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/ant-1.9.6.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/ant-launcher-1.9.6.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-base-services-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-base-services-groovy-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-cli-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-core-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-docs-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-installation-beacon-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-jvm-services-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-launcher-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-logging-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-messaging-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-model-core-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-model-groovy-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-native-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-open-api-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-process-services-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-resources-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-tooling-api-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-ui-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-wrapper-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-announce-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-antlr-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-build-comparison-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-build-init-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-code-quality-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-dependency-management-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-diagnostics-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-ear-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-ide-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-ide-native-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-ide-play-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-ivy-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-jacoco-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-javascript-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-jetty-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-language-groovy-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-language-java-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-language-jvm-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-language-native-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-language-scala-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-maven-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-osgi-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-platform-base-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-platform-jvm-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-platform-native-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-platform-play-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-plugin-development-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-plugin-use-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-plugins-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-publish-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-reporting-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-resources-http-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-resources-s3-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-resources-sftp-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-scala-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-signing-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-sonar-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-test-kit-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-testing-base-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-testing-jvm-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-testing-native-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-tooling-api-builders-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/ivy-2.2.0.jar:/Applications/Android Studio.app/Contents/lib/idea_rt.jar" com.intellij.rt.execution.application.AppMain org.gradle.launcher.GradleMain --build-file /Users/troychuinard/Code/FanPolls/app/build.gradle 
Incremental java compilation is an incubating feature. 
:app:help 

Welcome to Gradle 2.14.1. 

To run a build, run gradle <task> ... 

To see a list of available tasks, run gradle tasks 

To see a list of command-line options, run gradle --help 

To see more detail about a task, run gradle help --task <task> 

BUILD SUCCESSFUL 

Total time: 8.841 secs 

This build could be faster, please consider using the Gradle Daemon: https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html 

Process finished with exit code 0 

提示是永遠不會出現的,要求我選擇部署目標。 Android Studio中啓用的設置是什麼?

+0

嘗試更新gradle和JDK並重試 –

+0

看起來像在您的gradle中的一些missconfiguration。嘗試重新導入您的項目 –

+0

如何重新導入? – tccpg288

回答

2

爲了使Deployment Target DialogRun -> Edit Configuration -> Android App (app) -> Target: Open Select Deployment Target Dialog

除此之外您還可以使您的設備上developer mode,並有通過SDK管理器或製造商安裝的驅動程序。

要檢查您的設備是否被識別,您可以使用adb devices,它應該被列出。

adb位於platform-tools例如,

C:\Users\You\AppData\Local\Android\sdk\platform-tools 
0

我發現了Android構建工具版本25.0.0解決了這個問題,我以前使用25.0.1和它不加載設備選配:

android { 
compileSdkVersion 24 
buildToolsVersion '25.0.0' 
} 

任何人都能夠與運行最新的構建工具?

相關問題