Android Studio's device chooser is shown before Gradle Build completes

好久不见. 提交于 2020-01-11 08:27:10

问题


Prior to Android Studio 1.5, the device chooser was shown upon Gradle Build completion.

This allowed to use build time to physically configure devices, make any last minute changes or to ensure that devices were actually connected at the time of install. I also disconnected devices if I wanted to cancel my gradle run without interrumpting my workflow.

With the device chooser showing before Gradle Build completion I am forced to have my devices physically connected before starting my build; this makes me lose time I could've saved while performing any connections while the Gradle Build was completing. I am also not ensured that installation won't fail when the build is finished since any of my connected devices could no longer be available by the time the build has completed or adb could even stop responding (which is not that uncommon).

I'm sure it will still a matter of preference for some but, is it possible to configure the device chooser so that it appears after Gradle Build has completed and is ready to upload the apk to my devices?


回答1:


Per the Android Studio 1.5 Preview 2 release notes:

In 1.5 we've reworked the build+deploy flow such that instead of first building with Gradle and then popping up the "choose a device" dialog, we now immediately ask for a device to push the APK to. Some users were using Run + Cancel to build an APK; we now added a separate "Build APK" action to the Build menu for that purpose.

So the only option to start a build without a selected device is to use the Build APK action.



来源:https://stackoverflow.com/questions/33810919/android-studios-device-chooser-is-shown-before-gradle-build-completes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!