NativeScript Android .aab/.apk 已发布,但应用程序安装后无法打开
应用程序:NativeScript + Angular + TypeScript
平台:Android
问题:
在开发过程中一切正常。通过“ns run android”,该应用程序在我的 Android 手机上完美运行。到目前为止一切顺利,我创建了 .aab 包,并将其发布到 Google Play 商店,我可以在商店中看到该应用程序,并且可以毫无问题地将其下载/安装到我的 Android 手机上。到目前为止一切看起来都很好。但是,当尝试打开该应用程序时,它会在不到一秒后停止并消失,因此无法打开。
为了理解这个问题,我做了更多的测试。 (1) 创建.apk并发布到Play Store,问题仍然完全相同; (2) 我没有发布到 Play 商店,而是将 .apk 传输到手机并安装,在尝试打开它时,出现同样的问题。
这似乎是 .aab/.apk 包的问题,但我无法弄清楚真正的原因是什么以及如何解决它。我现在有点卡住了。这就是为什么我来这里寻求建议。
构建 .aab 的命令
ns build android --release --key-store-path mykey.keystore --key-store-password mypswd --key-store-alias mykey --key-store-alias-password mypswd --aab --复制到app-release.aab
构建 .apk 的命令
ns build android --release --key-store-path mykey.keystore --key-store-password mypswd --key-store-alias mykey --key-store-alias-password mypswd --copy-to应用程序发布.apk
下面是一些类似问题的解决方案,我用谷歌搜索并尝试过,不幸的是没有一个适合我的情况。 https://support.google.com/googleplay/answer/2668665?hl= zh 我的 Android 应用未打开但正在安装 https://docs.nativescript.org/releasing.html#android-app-捆绑 ……
我的环境:
NativeScript CLI:8.1.5 角度 CLI:13.2.2 节点:17.6.0(不支持) 包管理器:npm 8.5.1 操作系统:win32 x64 @Angular-devkit/建筑师0.1301.4 @Angular-devkit/build-Angular 13.1.4 @Angular-devkit/核心 13.1.4 @angular-devkit/schematics 13.2.2(仅限 cli) @ngtools/webpack 13.1.4 @schematics/angular 13.2.2(仅限 cli) rxjs 7.4.0 打字稿 4.4.4
谢谢,
Application: NativeScript + Angular + TypeScript
Platform : Android
Problem:
During development everything works fine. By "ns run android", the app works perfectly on my android phone. So far so good, I created .aab package, and published it to Google Play Store, I can see the app in the store, and I'm able to download/install it to my android phone with no problem. Everything looks good up to this point. However, when trying to open the app, it just stops and disappear after less than a second, so it cannot be opened.
In order to understand the problem, I did more tests. (1) created .apk and published to Play Store, the problem remains exactly the same; (2) instead of publishing to Play Store, I transferred the .apk to the phone and installed it, while trying to open it, same problem.
It seems to be a problem with the .aab/.apk package, but I'm not able to figure out what's the real cause and how to get it resolved. I'm now kind of stuck. That's why I'm here to look for suggestions.
The command to build .aab
ns build android --release --key-store-path mykey.keystore --key-store-password mypswd --key-store-alias mykey --key-store-alias-password mypswd --aab --copy-to app-release.aab
The command to build .apk
ns build android --release --key-store-path mykey.keystore --key-store-password mypswd --key-store-alias mykey --key-store-alias-password mypswd --copy-to app-release.apk
Below are some solutions for similar problems, which I googled and tried, and unfortunately none works for my situation.
https://support.google.com/googleplay/answer/2668665?hl=en
My android app is not opening but installing
https://docs.nativescript.org/releasing.html#android-app-bundle
... ...
My environment:
NativeScript CLI: 8.1.5
Angular CLI: 13.2.2
Node: 17.6.0 (Unsupported)
Package Manager: npm 8.5.1
OS: win32 x64
@angular-devkit/architect 0.1301.4
@angular-devkit/build-angular 13.1.4
@angular-devkit/core 13.1.4
@angular-devkit/schematics 13.2.2 (cli-only)
@ngtools/webpack 13.1.4
@schematics/angular 13.2.2 (cli-only)
rxjs 7.4.0
typescript 4.4.4
Thanks,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论