青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

隨筆 - 132  文章 - 51  trackbacks - 0
<2012年8月>
2930311234
567891011
12131415161718
19202122232425
2627282930311
2345678

常用鏈接

留言簿(7)

隨筆分類

隨筆檔案

文章分類

文章檔案

cocos2d-x

OGRE

OPenGL

搜索

  •  

最新評論

閱讀排行榜

評論排行榜

Signing in Release Mode


When your application is ready for release to other users, you must:

  1. Obtain a suitable private key
  2. Compile the application in release mode
  3. Sign your application with your private key
  4. Align the final APK package
發布release版本要有4步
官方說明: 
 http://developer.android.com/tools/publishing/app-signing.html#releasecompile 


平時通過Eclipse生成在bin目錄下的apk文件,都是debug版的,如何創建release版的軟件呢? 
其實還是挺簡單的。 

1. 通過java自帶的keytool工具,創建release版的keystore 

keytool -genkey -v -keystore keystore_name.keystore -alias alias_name -keyalg RSA -validity 10000 


keystore_name.keystore:要創建的release版keystore的文件名 
alias_name:別名?取個好記點的名字吧,后面還要用到的 (填寫配置文件)
-keyalg RSA:通過RSA算法生成 
-validity 10000:有效期,單位是天 

如果java環境配置正常,輸入命令后會出現下列信息 
Enter keystore password:(keystore的密碼) 
Re-enter new password:(確認keystore的密碼) 
What is your first and last name? 
  [Unknown]:  (姓名,用自己喜歡的名字吧,不知道會顯示在哪里) 
What is the name of your organizational unit? 
  [Unknown]:  (組織單位) 
What is the name of your organization? 
  [Unknown]:  (組織,不知道和上面那個有什么區別) 
What is the name of your City or Locality? 
  [Unknown]:  (城市) 
What is the name of your State or Province? 
  [Unknown]:  (州,省,縣) 
What is the two-letter country code for this unit? 
  [Unknown]:  CN 
Is CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=CN correct? 
  [no]:  yes (確認輸入的信息) 

Generating 1,024 bit RSA key pair and self-signed certificate (SHA1withRSA) with 
a validity of 10,000 days 
        for: CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=CN 
Enter key password for <alias_name> 
        (RETURN if same as keystore password):(alias的密碼,如果和keytore密碼一致,直接回車) 
Re-enter new password:(確認alias的密碼) 
[Storing my-release-key.keystore] 


2.發布Release版本
Signing in Release Mode


When your application is ready for release to other users, you must:

  1. Obtain a suitable private key
  2. Compile the application in release mode
  3. Sign your application with your private key
  4. Align the final APK package
官方的步驟有4步,編譯release版本的應用程序

2.1 Eclipse導出
在Eclipse中,右鍵要發布的項目,依次選擇Android Tool -> Export Signed Application Package... 
然后就是step-by-step了,選擇剛才生成的release版keystore,輸入密碼,選擇alias,輸入alias密碼,生成release版的apk。 

2.2 采用ANT命令行形式

$ ant release

By default, the build script compiles the application APK without signing it. The output file in your project bin/ will be <your_project_name>-unsigned.apk. Because the application APK is still unsigned, you must manually sign it with your private key and then align it using zipalign. 

默認編譯出來的版本是沒有證書的<your_project_name>-unsigned.apk ,需要手動添加證書和對齊

To specify your keystore and alias, open the project ant.properties file (found in the root of the project directory) and add entries for key.store and key.alias. For example: 

我們可以在ant.properties文件中指定證書位置和對齊

# This file is used to override default values used by the Ant build system.
#
# This file must be checked into Version Control Systems, as it is
# integral to the build system of your project.

# This file is only used by the Ant script.

# You can use this to override default values such as
#  'source.dir' for the location of your java source folder and
#  'out.dir' for the location of your output folder.

# You can also use it define how the release builds are signed by declaring
# the following properties:
#  'key.store' for the location of your keystore and
#  'key.alias' for the name of the key to use.
# The password will be asked during the build when you use the 'release' target.

#我的證書在上一級目錄下
#alias是創建證書時填寫的alias_name

key.store=../keystore_name.keystore 
key.alias=alias_name

接下來的步驟很easy了

Save your changes. Now you can build a signed .apk in release mode:

  1. Open a command-line and navigate to the root of your project directory.
  2. Use Ant to compile your project in release mode:
    ant release
  3. When prompted, enter you keystore and alias passwords.

    Caution: As described above, your password will be visible on the screen.

This creates your Android application .apk file inside the project bin/ directory, named<your_project_name>-release.apk. This .apk file has been signed with the private key specified inant.properties and aligned with zipalign. It's ready for installation and distribution.

ant release后會生成一個<your_project_name>-release.apk的版本

啊,世界清靜了~~~ 

最后就是安裝了。 
由于使用了新的簽名,必須先卸載原來安裝的程序才可以安裝。 


/////////////////////////////////////////////////////////////////////////////////////////////////////////////

常見問題:
生成的debug和release有什么區別 大小差不多

Support for a true debug build. Developers no longer need to add the android:debuggable attribute to the tag in the manifest — the build tools add the attribute automatically. In Eclipse/ADT, all incremental builds are assumed to be debug builds, so the tools insert android:debuggable="true". When exporting a signed release build, the tools do not add the attribute. In Ant, a ant debug command automatically inserts the android:debuggable="true" attribute, while ant release does not. If android:debuggable="true" is manually set, then ant release will actually do a debug build, rather than a release build. 




























posted on 2012-08-15 10:11 風輕云淡 閱讀(2324) 評論(0)  編輯 收藏 引用 所屬分類: cocos2d
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            久久久久看片| 欧美日产一区二区三区在线观看 | 欧美大香线蕉线伊人久久国产精品| 99精品国产99久久久久久福利| 亚洲精美视频| 最新成人av在线| 一区二区高清在线| 亚洲免费一级电影| 欧美在线观看视频在线| 久热这里只精品99re8久| 欧美不卡在线视频| 亚洲精品一区在线观看香蕉| 99日韩精品| 午夜精品一区二区三区在线视| 久久国产色av| 欧美日韩久久久久久| 激情视频一区| 午夜精品美女久久久久av福利| 美乳少妇欧美精品| 亚洲图片欧美午夜| 麻豆久久久9性大片| 国产精品一区二区三区成人| 亚洲国产精品悠悠久久琪琪| 亚洲欧洲av一区二区| 欧美激情小视频| 欧美亚洲综合在线| 国产精品成人aaaaa网站| 在线观看日韩一区| 亚洲欧美日韩成人| 黄色成人av在线| 亚洲日本一区二区| 久久久久久久久久看片| 亚洲手机成人高清视频| 久久一区二区三区四区五区| 一区二区在线视频观看| 久久国产精品亚洲77777| 亚洲神马久久| 国产精品日韩欧美| 久久久精品一区| 欧美中文字幕不卡| 亚洲国产欧美日韩精品| 亚洲国产精品www| 久久理论片午夜琪琪电影网| 在线观看国产日韩| 欧美大秀在线观看| 欧美日在线观看| 欧美一区免费| 久久久久久自在自线| 亚洲精品视频一区二区三区| 一区二区三区免费在线观看| 国产精品福利av| 久久欧美肥婆一二区| 欧美顶级少妇做爰| 亚洲一区久久| 欧美mv日韩mv国产网站app| 亚洲无吗在线| 欧美不卡视频| 久久国产免费| 国产精品黄色| 亚洲另类在线视频| 激情综合亚洲| 亚洲一区中文字幕在线观看| 亚洲国产精品第一区二区| 中文av一区特黄| 久久三级视频| 亚洲一级一区| 蜜臀av国产精品久久久久| 欧美在线观看网站| 欧美影院久久久| 欧美性猛交xxxx乱大交退制版| 美脚丝袜一区二区三区在线观看| 国产精品入口日韩视频大尺度| 日韩视频一区二区在线观看 | 欧美一区二区三区喷汁尤物| 亚洲欧洲视频| 欧美搞黄网站| 亚洲国产欧美日韩另类综合| 亚洲国产老妈| 欧美午夜视频在线| 亚洲欧美日本日韩| 久久99伊人| 在线精品视频在线观看高清 | 老妇喷水一区二区三区| 狼狼综合久久久久综合网| 亚洲第一视频网站| 欧美日韩国产精品一区二区亚洲| 亚洲理伦在线| 久久精品人人| 亚洲国产cao| 欧美三级在线| 牛人盗摄一区二区三区视频| 亚洲视频精选在线| 久久精品官网| 中文日韩在线| 亚洲第一主播视频| 国产精品亚洲综合色区韩国| 小嫩嫩精品导航| 在线欧美福利| 国产欧美日韩精品一区| 久久综合色88| 午夜精品久久久久久久男人的天堂 | 久久九九电影| 亚洲一区影音先锋| 夜夜嗨av色综合久久久综合网 | 在线精品国产欧美| 国产婷婷色一区二区三区在线| 欧美韩日一区二区| 老巨人导航500精品| 老司机一区二区三区| 欧美中文字幕| 午夜在线一区| 亚洲性色视频| 亚洲网在线观看| 亚洲性感激情| 久久久久久久久蜜桃| 欧美一区二区视频免费观看| 欧美一区二区三区久久精品茉莉花 | 欧美视频二区| 欧美日韩一区二区三区四区五区| 欧美激情偷拍| 国产精品久久网| 精品1区2区| 99re热精品| 午夜久久久久久| 欧美aaa级| 中文一区字幕| 欧美国产日本| 国产麻豆综合| 91久久黄色| 亚洲一区二区三区高清| 欧美成年人网站| 精品999日本| 亚洲午夜精品在线| 久久久久久久波多野高潮日日| 欧美bbbxxxxx| 亚洲直播在线一区| 欧美视频一区二区在线观看 | 久久久夜精品| 国产麻豆精品视频| 亚洲午夜在线观看| 亚洲人成免费| 国产精品久久久爽爽爽麻豆色哟哟 | 日韩视频国产视频| 一区二区黄色| 亚洲美女黄网| 欧美激情在线狂野欧美精品| 亚洲国产综合在线看不卡| 麻豆精品视频| 欧美 亚欧 日韩视频在线| 尤物99国产成人精品视频| 久久精品一本久久99精品| 亚洲欧美成人一区二区三区| 国产精品久久久久久久久久久久久 | 亚洲精品欧美激情| 美女性感视频久久久| 久久不射中文字幕| 娇妻被交换粗又大又硬视频欧美| 久久婷婷一区| 米奇777在线欧美播放| 亚洲人成高清| 国产精品视频一二三| 久久国产精品网站| 免费欧美在线| 欧美另类高清视频在线| 欧美激情第1页| 欧美二区在线观看| 亚洲精选国产| 西瓜成人精品人成网站| 极品尤物一区二区三区| 亚洲国产日本| 国产午夜亚洲精品理论片色戒| 久久久亚洲人| 欧美日韩在线播放三区| 久久激情视频久久| 欧美日韩国产高清视频| 久久精品国产69国产精品亚洲| 久久精品免费看| 亚洲欧美成人| 蜜臀av一级做a爰片久久| 欧美一区深夜视频| 国产精品成人一区二区| 欧美成人免费大片| 国产亚洲欧美一级| 亚洲精品永久免费| 99日韩精品| 欧美日韩午夜在线| 亚洲免费精品| 亚洲欧美日韩一区二区三区在线| 欧美成人免费全部| 亚洲国产精品va在线看黑人动漫| 狠狠色狠狠色综合日日91app| 亚洲欧美在线aaa| 久久天天狠狠| 亚洲高清在线观看一区| 蘑菇福利视频一区播放| 亚洲日本欧美天堂| 亚洲美女中文字幕| 欧美午夜宅男影院| 亚洲欧美日韩中文在线制服| 久久精品成人一区二区三区 |