meteor build 应用无法安装在 android phone
meteor build app can't install on android phone
我通过 运行
生成了一个 apk 文件
meteor build ~/output-dir --server=myapp.meteor.com
,
然后在文件夹output-dir
下得到release-unsigned.apk
,看起来不错
我将此 apk 文件复制到我的 Android phone 并尝试安装它,安装指南后,它显示消息 App not installed
.
我之前在我的phone上安装了一些由java构建的apk文件,它可以工作,所以我在安装由meteor构建的apk文件时需要处理什么?
如 documentation 所述,您无法在 Android phone 上安装未签名的应用程序:
Android requires that all apps be digitally signed with a certificate
before they can be installed.
据我所知,运行 您的应用有以下两种选择:
- 使用模拟器 运行 您未签名的应用或
- 为您的应用签名。
要为您的应用签名,您可以使用 Meteor guide for submitting Android apps to the Play Store:
中描述的步骤
- 使用
keytool
生成私钥(如果您已经生成了私钥,请跳过此步骤):
keytool -genkey -alias your-app-name -keyalg RSA -keysize 2048 -validity 10000
- 使用
jarsigner
工具为您的应用签名:
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 unaligned.apk your-app-name
之后,您应该能够在 Android phone.
上安装和 运行 您的应用程序
我通过 运行
生成了一个 apk 文件meteor build ~/output-dir --server=myapp.meteor.com
,
然后在文件夹output-dir
下得到release-unsigned.apk
,看起来不错
我将此 apk 文件复制到我的 Android phone 并尝试安装它,安装指南后,它显示消息 App not installed
.
我之前在我的phone上安装了一些由java构建的apk文件,它可以工作,所以我在安装由meteor构建的apk文件时需要处理什么?
如 documentation 所述,您无法在 Android phone 上安装未签名的应用程序:
Android requires that all apps be digitally signed with a certificate before they can be installed.
据我所知,运行 您的应用有以下两种选择:
- 使用模拟器 运行 您未签名的应用或
- 为您的应用签名。
要为您的应用签名,您可以使用 Meteor guide for submitting Android apps to the Play Store:
中描述的步骤- 使用
keytool
生成私钥(如果您已经生成了私钥,请跳过此步骤):
keytool -genkey -alias your-app-name -keyalg RSA -keysize 2048 -validity 10000
- 使用
jarsigner
工具为您的应用签名:
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 unaligned.apk your-app-name
之后,您应该能够在 Android phone.
上安装和 运行 您的应用程序