Nativescript 6.5 在 Android 崩溃
Nativescript 6.5 crashes on Android
我的 NS 6.5 Core 应用程序在 iOS 上运行良好,并且在 Android 上构建也没有问题,但是当我尝试在设备(模拟器或物理设备)上安装它时,我得到以下信息错误:
Installing on device emulator-5554...
Successfully installed on device with identifier 'emulator-5554'.
Application com.comapny.app is not running on device emulator-5554.
This issue may be caused by:
* crash at startup (try `tns debug android --debug-brk` to check why it crashes)
* different application identifier in your package.json and in your gradle files (check your identifier in `package.json` and in all *.gradle files in your App_Resources directory)
* device is locked
* manual closing of the application
Unable to apply changes on device: emulator-5554. Error is: Application com.comapny.app is not running.
根据报错提示,我检查了:
- 设备未锁定
- 应用程序 ID 正确
- 我尝试了 tns debug android --debug-brk。我得到了同样的错误,但没有其他信息。
如果我 运行 tns 运行 android 或 tns debug android[ 也会发生同样的情况=46=]。我也在 Windows 和 Mac.
上试过了
这是我的 package.json:
{
"nativescript": {
"id": "com.company.app",
"tns-ios": {
"version": "6.5.4"
},
"tns-android": {
"version": "6.5.3"
}
},
"main": "app.js",
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"repository": "<fill-your-repository-here>",
"dependencies": {
"@nativescript/theme": "^2.3.3",
"@nstudio/nativescript-loading-indicator": "^3.0.4",
"@types/node": "14.0.23",
"moment": "^2.27.0",
"moment-timezone": "^0.5.31",
"nativescript-email": "^1.6.0",
"nativescript-exit": "^1.0.1",
"nativescript-fingerprint-auth": "^7.0.2",
"nativescript-image-zoom": "^3.0.3",
"nativescript-iqkeyboardmanager": "^1.5.1",
"nativescript-local-notifications": "^4.2.1",
"nativescript-masked-text-field": "^4.0.3",
"nativescript-numeric-keyboard": "^4.3.1",
"nativescript-pdf-view": "^2.4.3",
"nativescript-phone": "^2.0.0",
"nativescript-plugin-firebase": "^10.6.3",
"nativescript-sentry": "^1.0.0",
"nativescript-ui-calendar": "^6.1.0",
"nativescript-webview-utils": "^4.0.0",
"tns-core-modules": "6.5.19"
},
"devDependencies": {
"nativescript-dev-webpack": "1.5.1",
"tns-platform-declarations": "6.5.15",
"typescript": "3.9.7"
},
"gitHead": "",
"readme": "NativeScript Application"
}
我还能尝试什么?我没主意了。
谢谢
经过一些测试后发现,nativescript-sentry 是罪魁祸首。该插件在 iOS 上运行良好,不确定 Android 上的问题是什么。我会跟进插件作者以获取更多信息。
我的 NS 6.5 Core 应用程序在 iOS 上运行良好,并且在 Android 上构建也没有问题,但是当我尝试在设备(模拟器或物理设备)上安装它时,我得到以下信息错误:
Installing on device emulator-5554...
Successfully installed on device with identifier 'emulator-5554'.
Application com.comapny.app is not running on device emulator-5554.
This issue may be caused by:
* crash at startup (try `tns debug android --debug-brk` to check why it crashes)
* different application identifier in your package.json and in your gradle files (check your identifier in `package.json` and in all *.gradle files in your App_Resources directory)
* device is locked
* manual closing of the application
Unable to apply changes on device: emulator-5554. Error is: Application com.comapny.app is not running.
根据报错提示,我检查了:
- 设备未锁定
- 应用程序 ID 正确
- 我尝试了 tns debug android --debug-brk。我得到了同样的错误,但没有其他信息。
如果我 运行 tns 运行 android 或 tns debug android[ 也会发生同样的情况=46=]。我也在 Windows 和 Mac.
上试过了这是我的 package.json:
{
"nativescript": {
"id": "com.company.app",
"tns-ios": {
"version": "6.5.4"
},
"tns-android": {
"version": "6.5.3"
}
},
"main": "app.js",
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"repository": "<fill-your-repository-here>",
"dependencies": {
"@nativescript/theme": "^2.3.3",
"@nstudio/nativescript-loading-indicator": "^3.0.4",
"@types/node": "14.0.23",
"moment": "^2.27.0",
"moment-timezone": "^0.5.31",
"nativescript-email": "^1.6.0",
"nativescript-exit": "^1.0.1",
"nativescript-fingerprint-auth": "^7.0.2",
"nativescript-image-zoom": "^3.0.3",
"nativescript-iqkeyboardmanager": "^1.5.1",
"nativescript-local-notifications": "^4.2.1",
"nativescript-masked-text-field": "^4.0.3",
"nativescript-numeric-keyboard": "^4.3.1",
"nativescript-pdf-view": "^2.4.3",
"nativescript-phone": "^2.0.0",
"nativescript-plugin-firebase": "^10.6.3",
"nativescript-sentry": "^1.0.0",
"nativescript-ui-calendar": "^6.1.0",
"nativescript-webview-utils": "^4.0.0",
"tns-core-modules": "6.5.19"
},
"devDependencies": {
"nativescript-dev-webpack": "1.5.1",
"tns-platform-declarations": "6.5.15",
"typescript": "3.9.7"
},
"gitHead": "",
"readme": "NativeScript Application"
}
我还能尝试什么?我没主意了。
谢谢
经过一些测试后发现,nativescript-sentry 是罪魁祸首。该插件在 iOS 上运行良好,不确定 Android 上的问题是什么。我会跟进插件作者以获取更多信息。