NME - 签署Android发布包

26 篇文章 0 订阅
14 篇文章 0 订阅

原文:http://www.gigglingcorpse.com/2012/03/15/nme-signing-for-android-release/

 

nme – signing for android release

After a few days of working on that simple game I mentioned earlier, and after much deliberation, sighing, and staring at the wall, I decided to try for a release package for android — which I found almost as confusing as I had feared.

Dear future-self, It is possible and this is how you once went about it:

Step 1. Create a private key thing1

Basically, run a command like this from the command line:

keytool-genkey -v -keystore  some-filename-of-your-choice.keystore -alias  however-you-want-to-reference-your-certificate-i-think-keyalg RSA -keysize 2048 -validity 10000

(It will be valid for 10,000 days, or ~27 years.)

The directory you run that command in will now have a file called some-filename-of-your-choice.keystore.

If keytool.execan’t be found, your paths may not be set up correctly (or up-to-date), and you can use the absolute path to the file (it’s in your JDK’s \bindirectory).

Step 2. Tell NME to use it

I looked around the NME source files for soo long, and it turns out it’s actually really simple!
You just need to add an element to your project’s .nmml(in my case application.nmml):

<certificate path="path/to/ some-filename-of-your-choice.keystore" alias=" whatever-alias-you-chose" />

 

The directory the pathattribute starts in is bin\android\bin, in your project’s base directory. So if your keystore is there, you’ll have to set path/to/to some number of ../s, or just use an absolute path.

Here’s the part that confused me (in spec.nmml):

<certificate path=" path/to/certificate.crt" password="1234" alias="my-alias" alias-password="4321" />

 

It went something like this: .cert? [Panic] But, I don’t even have one of those!Good news though, apparently you don’t even need one!

After that, nmedoes everything for you! (It’ll ask for your passwords as it runs through, after you tell it nme test filename.nmml android).

Step 3. That didn’t work so much

At this point, at least for me, it still didn’t work. Android wouldn’t load the program, always going on about how [INSTALL_PARSE_FAILED_NO_CERTIFICATES] — which, by the way, was blatantly a lie.

Long story, but eventually it took installing JDK 1.6and using that instead of JDK 1.7.0_1. 

I’d completely forgotten that during NME‘s android setup it had asked me where the JDK was. So I just ended up telling it to setup android again, after which I got into a huge mess of things not working — all of which were my fault until:
The file NME was downloading for Apache Ant wasn’t right (I’m assuming the file moved). Not a big deal, I downloaded the file manually and replaced the one NME had downloaded with it before proceeding to the next step in its setup. (Turns out it downloads the temporary zips to the directory you called nme setup androidfrom.)

Once it was using JDK 1.6, everything worked as (in my opinion) it should have worked originally!

The end.


In summary:
1. use jdk 1.6 instead of jdk 1.7.0_01
2. run the keytool command
3. add the certificate tag to your application.nmml

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
旅游社交小程序功能有管理员和用户。管理员有个人中心,用户管理,每日签到管理,景点推荐管理,景点分类管理,防疫查询管理,美食推荐管理,酒店推荐管理,周边推荐管理,分享圈管理,我的收藏管理,系统管理。用户可以在微信小程序上注册登录,进行每日签到,防疫查询,可以在分享圈里面进行分享自己想要分享的内容,查看和收藏景点以及美食的推荐等操作。因而具有一定的实用性。 本站后台采用Java的SSM框架进行后台管理开发,可以在浏览器上登录进行后台数据方面的管理,MySQL作为本地数据库,微信小程序用到了微信开发者工具,充分保证系统的稳定性。系统具有界面清晰、操作简单,功能齐全的特点,使得旅游社交小程序管理工作系统化、规范化。 管理员可以管理用户信息,可以对用户信息添加修改删除。管理员可以对景点推荐信息进行添加修改删除操作。管理员可以对分享圈信息进行添加,修改,删除操作。管理员可以对美食推荐信息进行添加,修改,删除操作。管理员可以对酒店推荐信息进行添加,修改,删除操作。管理员可以对周边推荐信息进行添加,修改,删除操作。 小程序用户是需要注册才可以进行登录的,登录后在首页可以查看相关信息,并且下面导航可以点击到其他功能模块。在小程序里点击我的,会出现关于我的界面,在这里可以修改个人信息,以及可以点击其他功能模块。用户想要把一些信息分享到分享圈的时候,可以点击新增,然后输入自己想要分享的信息就可以进行分享圈的操作。用户可以在景点推荐里面进行收藏和评论等操作。用户可以在美食推荐模块搜索和查看美食推荐的相关信息。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值