android 程式發布

來源:互聯網
上載者:User

    android要求所有的程式必須有簽名,否則就不會安裝該程式。在我們開發過程中,adt使用debug keystore,在 preference->android->buid中設定。debug的keystore預設有效期間為一年,如果你是從一年前開始開發android程式,那麼很可能出現debug keystore到期,導致你無法產生 apk檔案。我調了一下系統時間,就出現以下錯誤。此時你只要刪除debug keystore就行,系統又會為你產生有效期間為一年的私密金鑰。

[2011-08-29 19:47:03 - helloworld] Error generating final archive: Debug certificate expired on 10-6-18 下午10:12!

   當你release時,你可以用 右擊項目->android tools->export signed android package產生簽名的包。再此過程中,如果你還沒有你自己的私密金鑰,adt會自動調用 keytool 來為你產生。請保護好你的私密金鑰,否則被人盜用的話,就用攻擊你的簽名程式了。

   release前還應注意版本號碼,在manifest.xml中有兩個欄位android:versionCode="1"和android:versionName="1.0",其中前者是給程式或者android使用,以1遞增。後者是給使用者看的,在這裡你就可以使用主要版本號 次版本號碼 build號燈字串。

 

  詳見:http://developer.android.com/guide/publishing/app-signing.html

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.