標籤:android future blank 多媒體 target
在狂批了某供應商的多媒體控制App有多爛後,誇下海口自己要做一個也是分分鐘的事。當然要做好不容易,要超過他們的爛軟體還是有信心的。過程中遇到各種坑,其中之一如下
剛開始只使用一個平板進行調試,老是彈出選擇裝置的視窗,於是勾選“Use same device for future launches”,於是Eclipse預設使用上次選擇的裝置進行調試。
650) this.width=650;" style="background-image: none; border-right- 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://s3.51cto.com/wyfs02/M02/83/1C/wKiom1drTN3BA-hYAAE_zxlNdss180.png" width="615" height="441" />
但是,隨後需要在另一個裝置(手機)進行調試時,Eclipse再也不讓我選擇了,即使你在Debug Configurations > Android Application > Target裡選擇了“Always prompt to pick device”也無用。
650) this.width=650;" style="background-image: none; border-right- 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://s3.51cto.com/wyfs02/M00/83/1C/wKioL1drTOChPFNFAAEh_mDYGEc944.png" width="956" height="347" />
這應該這算是一個小bug,找了一圈解決方案如下。
將所有真機裝置拔除,然後準備一個虛擬設備AVD(Android Virtual Devices),這時在Debug Configurations裡選擇Always prompt to pick device,然後進行Debug,這時就會彈出選擇裝置(Android Device Chooser)的對話方塊。但是這時如果沒有選擇一個裝置,OK按鈕是灰色的,也就是說即使取消勾選“Use same device for future launches”沒有點OK也是無用,這時虛擬設備就派上用場了,選擇這個虛擬設備,OK。下次請謹慎選擇“Use same device for future launches”選項。
Eclipse調試Android App若選擇“Use same device for future launches”