【发布时间】:2017-03-20 14:16:30
【问题描述】:
您好,我正在使用 Nativescript 2.5.2 & Angular 2 和 webpack 2.2.0 来捆绑应用程序。 我遵循了“webpack”的所有说明,并成功为设备构建了 ios 版本,并且工作正常
npm run build-ios-bundle -- --release --for-device
并且在下面的 android 中运行正常,并且应用程序在 device/genymotion 中运行良好
npm run start-android-bundle
但是当我使用发布密钥构建应用程序时,商店构建成功但应用程序在启动屏幕后在设备中崩溃。
npm run build-android-bundle -- --release --key-store-path /Users/maisapride7/workspace/KIDSAPP/tingr-teacher-key.jks --key-store-password tingr786 --key-store-alias my-alias --key-store-alias-password tingr786
并且没有 webpack 的发布 apk 在设备中正常工作而没有任何崩溃
tns build android --release --key-store-path /Users/maisapride7/workspace/KIDSAPP/tingr-teacher-key.jks --key-store-password tingr786 --key-store-alias my-alias --key-store-alias-password tingr786
谁能帮助我为什么它不适用于 webpack 构建以使用密钥库发布?
下面是我的 package.json 文件
{
"description": "app description..",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "...",
"repository": "....",
"nativescript": {
"id": "org.tingr.teacher",
"tns-android": {
"version": "2.5.0"
}
},
"dependencies": {
"@angular/common": "~2.4.5",
"@angular/compiler": "~2.4.5",
"@angular/core": "~2.4.5",
"@angular/forms": "~2.4.5",
"@angular/http": "~2.4.5",
"@angular/platform-browser": "~2.4.5",
"@angular/platform-browser-dynamic": "~2.4.5",
"@angular/router": "~3.4.5",
"moment": "^2.17.1",
"nativescript-angular": "1.4.1",
"nativescript-cardview": "^1.2.1",
"nativescript-carousel": "^2.2.0",
"nativescript-dom": "^1.0.8",
"nativescript-fresco": "^1.0.16",
"nativescript-imagepicker": "^2.4.1",
"nativescript-iqkeyboardmanager": "^1.0.1",
"nativescript-permissions": "^1.2.2",
"nativescript-plugin-firebase": "^3.10.2",
"nativescript-pulltorefresh": "^1.1.10",
"nativescript-telerik-ui": "^1.5.1",
"nativescript-theme-core": "^0.2.1",
"nativescript-toasts": "^1.0.2",
"reflect-metadata": "^0.1.8",
"rxjs": "~5.0.1",
"tns-core-modules": "^2.5.1"
},
"devDependencies": {
"@angular/compiler-cli": "~2.4.5",
"@ngtools/webpack": "1.2.10",
"babel-traverse": "6.8.0",
"babel-types": "6.8.1",
"babylon": "6.8.0",
"copy-webpack-plugin": "~3.0.1",
"extract-text-webpack-plugin": "~2.0.0-beta.4",
"lazy": "1.0.11",
"nativescript-css-loader": "~0.26.0",
"nativescript-dev-android-snapshot": "0.0.7",
"nativescript-dev-typescript": "^0.3.2",
"nativescript-dev-webpack": "^0.3.6",
"raw-loader": "~0.5.1",
"resolve-url-loader": "~1.6.0",
"typescript": "~2.1.0",
"webpack": "2.2.0",
"webpack-sources": "~0.1.3",
"zone.js": "~0.7.2"
},
"scripts": {
"ns-bundle": "ns-bundle",
"start-android-bundle": "npm run ns-bundle --android --start-app",
"start-ios-bundle": "npm run ns-bundle --ios --start-app",
"build-android-bundle": "npm run ns-bundle --android --build-app",
"build-ios-bundle": "npm run ns-bundle --ios --build-app"
}
}
【问题讨论】:
-
显示错误以便于识别错误
-
@DouglasFranco,我在 firebase 中启用了崩溃报告,但没有保存日志。我是 android 新手,您能帮我检查一下 genymotion 或我的移动设备中发布 apk 的日志。
-
genymotion 默认会在应用崩溃时在模拟器的显示屏上显示日志跟踪,然后您可以在此处复制粘贴。
-
发布一些日志以便我可以帮助您?
-
不幸显示的对话框 'appname' 已关闭尝试解决或确定按钮显示其发布 apk 和问题。
标签: nativescript angular2-nativescript nativescript-telerik-ui