ionic bulid android

ionic build --release android

keytool -genkey -v -keystore demo.keystore -alias demo.keystore -keyalg RSA -validity 20000

jarsigner -verbose -keystore /yourpath/demo.keystore -signedjar demo_signed.apk demo.apk demo.keystore

zipalign -v 4 your_project_name-unaligned.apk your_project_name.apk

https://github.com/nordnet/cordova-hot-code-push
Signing Your App Manually
You do not need Android Studio to sign your app. You can sign your app from the command line using standard tools from the Android SDK and the JDK. To sign an app in release mode from the command line:

Generate a private key using keytool. For example:

1, keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
2,jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore my_application.apk alias_name
3,jarsigner -verify -verbose -certs my_application.apk

/opt/android-sdk-linux/build-tools/21.0.2# ./zipalign

http://www.phonegap100.com/article-491-1.html

agileek/ionic-framework
4,zipalign -v 4 your_project_name-unaligned.apk your_project_name.apk

 

This example prompts you for passwords for the keystore and key, and to provide the Distinguished Name fields for your key. It then generates the keystore as a file called my-release-key.keystore. The keystore contains a single key, valid for 10000 days. The alias is a name that you will use later when signing your app.
Compile your app in release mode to obtain an unsigned APK.
Sign your app with your private key using jarsigner:
$ jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1
-keystore my-release-key.keystore my_application.apk alias_name
This example prompts you for passwords for the keystore and key. It then modifies the APK in-place to sign it. Note that you can sign an APK multiple times with different keys.
Verify that your APK is signed. For example:
$ jarsigner -verify -verbose -certs my_application.apk
Align the final APK package using zipalign.
$ zipalign -v 4 your_project_name-unaligned.apk your_project_name.apk
zipalign ensures that all uncompressed data starts with a particular byte alignment relative to the start of the file, which reduces the amount of RAM consumed by an app.

 

https://play.google.com/apps/publish/?

jarsigner是工具名称,-verbose表示将签名过程中的详细信息打印出来;
-keystore /yourpath/demo.keystore 之前生成的证书
-signedjar demo_signed.apk 签名后的apk
demo.apk 需要签名的apk
demo.keystore 证书的别名

附:查看apk的签名

Mac下,把apk的后缀改为zip打开,然后查看META-INF下的.RSA文件
Windows下,用winner打开apk,同样查看.RSA文件
执行命令

keytool -printcert -file META-INF/CERT.RSA
1
注意后面文件的名称与路径即可,可以查看到签名信息,主要是查看Certificate fingerprints下的MD5与SHA1,这两个不同就代表着签名不同。

ionic build --release android的更多相关文章

  1. ionic build Android错误记录未解决

    1.try itcordova -v cordova create testing cd testing cordova plugin add cordova-plugin-sim cordova p ...

  2. ionic build android error when download gradle

    这里我遇到一个问题,当用  ionic build android 的时候,无数次build,无数次失败的时候,我真想骂一句,NND的GNF,我又想起武大的臭鸡蛋,是的,该丢,发明这种东西的人,难道不 ...

  3. MAC 环境 ionic build android 命令在"Downloading http://services.gradle.org/distributions/gradle-2.13-all.zip"卡住问题

    如题: 环境 node: 4.5.0,npm:2.15.9,cordova :6.3.1, ionic:2.1.0 在ionic build android 命令执行时,会去这个网址下载 gradel ...

  4. ionic build android 中的报错详细原因以及解决方法

    一.执行打包命令 ionic build android 1.报错: 原因: 其实也并非报错,但是会一直在下载gradle,由于网络或者其他原因,导致下载比较慢, 解决方案: 手动下载gradle,并 ...

  5. ionic build android log

    RubertdeMacBook-Pro:~ Rubert$ ionic build android Current working directory is not a Cordova-based p ...

  6. ionic build Android错误记录 error in opening zip file

    0.写在前头 运行 :cordova requirements Requirements check results for android: Java JDK: installed 1.8.0 An ...

  7. ionic build android--> Build failed with an exception. Execution failed for task ':processDebugResources'.

    执行 ionic build android,   ionic 自动化生成安卓apk包, 出现以上报错的原因为:打包的文件中含有中文名,把中文名的文件去掉或改名即可打包成功.

  8. Win10 下使用 ionic 框架开发 android 应用之搭载开发环境

    转载请注明出处:http://www.cnblogs.com/titibili/p/5102035.html 谢谢~ 1.下载JDK并配置Java运行环境 http://www.oracle.com/ ...

  9. [Ionic] Build and Run an Ionic App from Scratch

    Install: npm install ionic cordova -g Create a project with blank template: ionic start <project_ ...

随机推荐

  1. Android listview和ListAdapter搭配使用

    ListView时Android中自带的数据显示控件,要使用ListView填充数据,必须要通过适配器来填充,这里给大家介绍一下ListAdapter适配器,效果图如下: java源码: packag ...

  2. iframe页面调用父窗口JS函数

    A页面iframe 页面B, 此时 如果要在B页面调用父页面A的函数 B页面写法 parent.functionName(); 错误1: 解决办法 var js_domain_async = 'bai ...

  3. Node 写文件

    在程序开发过程中会遇到很多自己认为是对的但实际运行出来并不是自己想的那样的,这个时候就可以把程序运行的比较关键点用文件的方式存储下来,然后分析 node 方式 var fs = require('fs ...

  4. smarty 学习记录

    smarty模版是比较大众化的一个模版,在php开发过程当中被很多开发者视为最友好的模版之一,学习smarty课程对于很多培训机构来说也是列入了培训课程之一,那么很多方面就需要我们学习了一. 安装首先 ...

  5. Mysql 联结表

  6. er6855的工作经验

    1 VIEWS里面的关系要搞清楚 里面的内容类型要理清 不要相信别人做好的事情 不要相信看到的结果 2 git rm -rf之后需要git commit提交到.git文件中正式生效 不然可能就是中间打 ...

  7. selenium 加载RemoteDriver浏览器驱动

    title NodeWebDriver java -jar selenium-server-standalone-2.42.2.jar -Dwebdriver.ie.driver="C:\S ...

  8. 小心Windows7的UTF-8代码页

    目录 第1章小心Windows7的UTF-8代码页    1 1.1 UTF-16与UTF-8相互转换    1 1.1.1 使用Windows API    1 1.1.2 自己编码    1 1. ...

  9. apk瘦身(包大小优化)

    最近太忙好久没有写随笔,放假才有空写写随笔. 最近在项目中一直在做包大小优化 随着业务需求的增加,包大小是忍不住的往上涨 为了提高应用市场下载转化率,一直在优化包大小 首先 分析你的apk中占比的主要 ...

  10. bower install和cnpm install

    bower install :主要是安装前端的相关框架,如Boostarp,Angular等 cnpm install :主要是安装后端的,如express等