標籤

2011年9月18日 星期日

Android Market 適用機型設定

話說, 程式上傳後等了約4小時 (也就是凌晨4點上傳 XD). 終於在 GOOGLE MARKET 上看到上傳的程式. 可是當我進行 MARKET 要下載時. 居然出現 "不支援你的手機"

事實上我是在 IDEOS U8150 上開發的. 結果上傳完成後. 在原來手機上不能用 (確實有點搞笑)

細看一下上傳內容部份如右圖. 出現了
android.hardware.autofocus
那當然不能用了.

可是事實上, 我的程式只要求一個權限, 並沒有要求要有這個功能.




<uses-permission android:name=
"android.permission.CAMERA"> </uses-permission>

原來, 當你要求這個執行權限時, APK 上傳之後就會自動加上 android.hardware.autofocus

所以, 當你查看可用機型清單時. 就會看到 IDEOS U8150 不支援! 這到底是怎麼回事呢? 經過詢問什麼都知道的G哥, G哥說了這段話. (在 Android Development 當中有寫)


  • When you declare "android:required="true" for a feature, you are specifying that the application cannot function, or is not designed to function, when the specified feature is not present on the device.
  • When you declare "android:required="false" for a feature, it means that the application prefers to use the feature if present on the device, but that it is designed to function without the specified feature, if necessary.

  • 明明我沒加, 可是又自動跑出來怎麼辦? 那只好手動.....
     <uses-feature android:name="android.hardware.camera.autofocus"  android:required="false" />
     和程式說, 算我怕你了. 如果你沒有自動對焦. 我也可以執了啦!

    然後你將原程式再上傳一次. Market 會說...

    版本代碼3已存在 >"<


    丫 SHIT! 只好乖乖的改版本代碼再傳一次.

    唉.... 已上傳儲存的版本不能取代嗎? 不清礎... 不過直覺操作下... 似乎不行.

    又折騰了半天..... $^*%(**)&)()

    沒有留言:

    張貼留言