Android 项目打包成apk文件

首先,要利用Android SDK 自带的kdytool生成keystore文件:

keytool -genkey -alias android.keystore -keyalg RSA -validity 100000 -keystore android.keystore
参数意义:-validity主要是证书的有效期,写100000天;空格,退格键都算密码。

在DOS里面的过程:

(D:\Program Files\Java\jdk1.7.0_25\bin> keytool -genkey -alias android.keystore -keyalg RSA -validity 100000 -keystore android.keystore
输入keystore密码: android
您的名字与姓氏是什么?
[Unknown]: sxl
您的组织单位名称是什么?
[Unknown]: xs
您的组织名称是什么?
[Unknown]: xs
您所在的城市或区域名称是什么?
[Unknown]: null
您所在的州或省份名称是什么?
[Unknown]: null
该单位的两字母国家代码是什么
[Unknown]: null
CN=sxl, OU=xs, O=xuesheng, L=null, ST=null, C=null 正确吗?
[否] y
输入<android.keystore>的主密码
(如果和keystore密码相同,按回车):)
在Linux终端的过程
[liuaibin@centos6 ~]$ keytool -genkey -alias android.keystore -keyalg RSA -validity 100000 -keystore android.keystore
Enter keystore password:  
Re-enter new password: 
What is your first and last name?
  [Unknown]:  sxl
What is the name of your organizational unit?
  [Unknown]:  xs
What is the name of your organization?
  [Unknown]:  xs
What is the name of your City or Locality?
  [Unknown]:  null
What is the name of your State or Province?
  [Unknown]:  null
What is the two-letter country code for this unit?
  [Unknown]:  null
Is CN=sxl, OU=xs, O=xs, L=null, ST=null, C=null correct?
  [no]:  y

Enter key password for <android.keystore>
    (RETURN if same as keystore password):

 

第二,Eclipse Android生成apk文件

1、选择要打包的项目,右键点击–>Androidtools–>ExportSignedApplicationPackage…

2、选择打包的项目

3、选择生成的Eclipse Android.keystore文件并输入密码

4、选择aliaskey并输入密码

5、最后选择生成androidapk文件的目录及文件名

6、最终生成的apk文件

转载于:https://www.cnblogs.com/sigmon/p/3748765.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值