Nativescript webpack 2.2.0 android版本apk在设备启动屏幕后崩溃
您好,我正在使用Nativescript 2.5.2和Angular 2以及webpack 2.2.0捆绑应用程序。 我按照“webpack”的所有说明,成功地为设备构建了ios版本,并且运行良好Nativescript webpack 2.2.0 android版本apk在设备启动屏幕后崩溃,nativescript,angular2-nativescript,nativescript-telerik-ui,Nativescript,Angular2 Nativescript,Nativescript Telerik Ui,您好,我正在使用Nativescript 2.5.2和Angular 2以及webpack 2.2.0捆绑应用程序。 我按照“webpack”的所有说明,成功地为设备构建了ios版本,并且运行良好 npm run build-ios-bundle -- --release --for-device 在安卓系统中,在设备/genymotion中,下面的程序运行正常 npm run start-android-bundle 但当我使用发布密钥构建应用程序时,商店构建成功,但应用程序在splash
npm run build-ios-bundle -- --release --for-device
在安卓系统中,在设备/genymotion中,下面的程序运行正常
npm run start-android-bundle
但当我使用发布密钥构建应用程序时,商店构建成功,但应用程序在splashscreen之后在设备中崩溃。
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
有谁能帮我解释一下,为什么它不适用于使用keystore发布的网页包构建?
下面是我的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"
}
}
{
“说明”:“应用程序说明…”,
“许可证”:“请参阅中的许可证”,
“自述”:“…”,
“存储库”:“…”,
“nativescript”:{
“id”:“org.tingr.teacher”,
“tns安卓”:{
“版本”:“2.5.0”
}
},
“依赖项”:{
“@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”,
“@角度/平台浏览器”:“~2.4.5”,
“@angular/platform browser dynamic”:“~2.4.5”,
“@angular/router”:“~3.4.5”,
“时刻”:“^2.17.1”,
“nativescript angular”:“1.4.1”,
“nativescript cardview”:“^1.2.1”,
“nativescript转盘”:“^2.2.0”,
“nativescript dom”:“^1.0.8”,
“nativescript壁画”:“^1.0.16”,
“nativescript图像选择器”:“^2.4.1”,
“nativescript iqkeyboardmanager”:“^1.0.1”,
“nativescript权限”:“^1.2.2”,
“nativescript插件firebase”:“^3.10.2”,
“nativescript pulltorefresh”:“^1.1.10”,
“nativescript telerik用户界面”:“^1.5.1”,
“nativescript主题核心”:“^0.2.1”,
“nativescript祝酒”:“^1.0.2”,
“反映元数据”:“^0.1.8”,
“rxjs”:“~5.0.1”,
“tns核心模块”:“^2.5.1”
},
“依赖性”:{
“@angular/compiler cli”:“~2.4.5”,
“@ngtools/webpack”:“1.2.10”,
“巴别塔穿越”:“6.8.0”,
“巴别塔类型”:“6.8.1”,
“巴比伦”:“6.8.0”,
“复制网页包插件”:“~3.0.1”,
“提取文本网页包插件”:“~2.0.0-beta.4”,
“懒惰”:“1.0.11”,
“nativescript css加载器”:“~0.26.0”,
“nativescript开发android快照”:“0.0.7”,
“nativescript开发人员类型脚本”:“^0.3.2”,
“nativescript开发人员网页包”:“^0.3.6”,
“原始装载机”:“~0.5.1”,
“解析url加载程序”:“~1.6.0”,
“类型脚本”:“~2.1.0”,
“网页包”:“2.2.0”,
“网页包来源”:“~0.1.3”,
“zone.js”:“~0.7.2”
},
“脚本”:{
“ns bundle”:“ns bundle”,
“启动android捆绑包”:“npm运行ns捆绑包--android--启动应用程序”,
“启动ios捆绑包”:“npm运行ns捆绑包--ios--启动应用程序”,
“构建android捆绑包”:“npm运行ns捆绑包——android——构建应用程序”,
“构建ios捆绑包”:“npm运行ns捆绑包--ios--构建应用程序”
}
}
在运行“tns平台删除android和&tns平台添加android”后,这对我很有效
npm run build-android-bundle -- --key-store-path my-key-store-path/my-key-store-filename[.jks | .keystore] --key-store-password my-key-store-password --key-store-alias my-alias --key-store-alias-password my-alias-password --release --for-device
显示错误以便于识别错误bug@DouglasFranco,我在firebase中启用了崩溃报告功能,但没有保存任何日志。我是android新手,您能否帮助我检查genymotion或我的移动设备中发布apk的日志。genymotion默认情况下,当应用程序崩溃时,会在emulator的显示屏上显示日志跟踪,然后您可以复制并粘贴到此处。发布一些日志以便我可以帮助您吗?显示的对话框“appname”不幸关闭,请尝试解决,或者“确定”按钮显示其版本apk,并且问题已解决。