快捷鏈接
下載地址
相關隨筆
正文
就如前篇隨筆寫到的, 在Google Play Console中, "應用"和"游戲服務"是兩個單獨模塊, 一個"Play Service"項可以"關聯(lián)"多個"App". App通過Play Service項的ID來訪問指定的成就和排行榜信息, 而Play Service項則是通過'OAUTH'來對App進行授權, 并通過App所使用的"簽名"(KeyStore)的SHA1進行校驗. 這意味著, 如果App的簽名跟授權時不一致, 那么App是無法正常訪問或者連接到指定的Play Service項上的. 這也是前篇隨筆中"悲劇"的緣由.
而我們知道, 在使用Eclipse調(diào)試時, 會使用默認的KeyStroe來對App"簽名", 但當要在Eclipse中直接調(diào)試Google Play Service相關的代碼時, 這種默認簽名方式跟Play Service的"簽名驗證"就沖突了. 那么有兩種方法可以試試:
一, 每次都簽名導出App, 在通過adb安裝; 優(yōu)點是簡單易操作, 缺點嘛, 只能用Log()輸出調(diào)試了;
二, 更改Eclipse的默認簽名KeyStore; 優(yōu)點是一次搞定萬無憂, 缺點嘛, 折騰..
好, 來折騰... 由于Eclipse的默認簽名有缺省alias和passwd要求, 那么需要做的就是更改當前所使用簽名的alias和passwd即可. 如下流程:
1. 更改指定別名xxxxxx到缺省別名androiddebugkey;
2. 更改androiddebugkey密碼為android;
3. 更改簽名文件KeyStore密碼為android;
D:\Studio\release>keytool -changealias -keystore codejie.keystore -alias xxxxxx -destalias androiddebugkey
Enter keystore password: xxxxxxxxxxxx
D:\Studio\release>keytool -keypasswd -keystore codejie.keystore -alias androiddebugkey
Enter keystore password: xxxxxxxxxxxx
New key password for <androiddebugkey>: android
Re-enter new key password for <androiddebugkey>: android
D:\Studio\release>keytool -storepasswd -keystore codejie.keystore
Enter keystore password: xxxxxxxxxxxx
New keystore password: android
Re-enter new keystore password: android
最后, 在Eclipse的Preferences->Android->Custom debug keystore指定codejie.keystore即可.
最最后, 記得備份你的keystore, 別再發(fā)生跟我一樣的悲劇...
<---- 傷心的分割線 ---->
剛剛在Google Play上正式關閉了I;P最早的下載jie.android.ip包, 同時也就丟失了所有的下載記錄, 統(tǒng)計信息等等~所以說, 備份keystore真的很重要...
<---- 隨手說明的分割線 ---->
另, 懶得再開個貼子了, 這里更新下I;P的進展 --
1. 昨天凌晨到家, 加上今晚, 新增了10+個成就, 非常有成就感~
2. 感謝I;P群中各位的 -- 無私的支持, 無數(shù)的錯誤, 以及無盡的需求; 至此I;P功能越來越強大, 關卡越來越豐富 -- 終于感到離收工不遠了~~
3. 爭取明晚再添加Leo提供的幾個關卡后, 就更新!