我尝试使用nativescript开发我的第一个应用程序,但由于遇到一些错误,我发现这有点困难...
当我尝试在模拟器中运行该应用程序时,出现错误Error detected during LiveSync on emulator
我开始使用该应用程序后就会发生此错误。.但是没有太多信息。.我安装了nativescript-localstorage,但仅此而已
同样,当我打开Sidekick应用程序时,我也收到错误消息:
[18-11-08 15:15:22.356] {"extensionName":"nativescript-angular-cli","extensionVersion":"0.1.9","error":{"stack":"Error: Unable to load extension nativescript-angular-cli. You will not be able to use the functionality that it adds. Error: Default commands should be required before child commands\n at ExtensibilityService.<anonymous> (/usr/local/lib/node_modules/nativescript/lib/services/extensibility-service.js:101:29)\n at Generator.next (<anonymous>)\n at fulfilled (/usr/local/lib/node_modules/nativescript/lib/services/extensibility-service.js:10:58)\n at <anonymous>\n at process._tickCallback (internal/process/next_tick.js:188:7)\n at Function.Module.runMain (module.js:695:11)\n at startup (bootstrap_node.js:191:16)\n at bootstrap_node.js:612:3","message":"Unable to load extension nativescript-angular-cli. You will not be able to use the functionality that it adds. Error: Default commands should be required before child commands","extensionName":"nativescript-angular-cli"}}
OUTPUT 1
我的app.gradle是
android {
defaultConfig {
generatedDensities = []
}
aaptOptions {
additionalParameters "--no-version-vectors"
}
}
def settingsGradlePath
if(project.hasProperty("appResourcesPath")){
settingsGradlePath = "$project.appResourcesPath/Android/settings.gradle";
} else {
settingsGradlePath = "$rootDir/../../app/App_Resources/Android/settings.gradle";
}
def settingsGradleFile = new File(settingsGradlePath);
if(settingsGradleFile.exists())
{
apply from: settingsGradleFile;
}
这是我的package.json
{
"nativescript": {
"id": "com.mydomain.company",
"tns-ios": {
"version": "5.0.0"
},
"tns-android": {
"version": "5.0.0"
}
},
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"repository": "<fill-your-repository-here>",
"scripts": {
"lint": "tslint \"src/**/*.ts\""
},
"dependencies": {
"@angular/animations": "~6.1.0",
"@angular/common": "~6.1.0",
"@angular/compiler": "~6.1.0",
"@angular/core": "~6.1.0",
"@angular/forms": "~6.1.0",
"@angular/http": "~6.1.0",
"@angular/platform-browser": "~6.1.0",
"@angular/platform-browser-dynamic": "~6.1.0",
"@angular/router": "~6.1.0",
"nativescript-angular": "~6.2.0",
"nativescript-localstorage": "^2.0.0",
"nativescript-theme-core": "~1.0.4",
"nativescript-ui-sidedrawer": "~5.0.0",
"reflect-metadata": "~0.1.10",
"rxjs": "~6.2.0",
"tns-core-modules": "~5.0.0",
"zone.js": "~0.8.18"
},
"devDependencies": {
"@nativescript/schematics": "~0.3.0",
"codelyzer": "~4.5.0",
"nativescript-dev-sass": "~1.6.0",
"nativescript-dev-typescript": "~0.7.0",
"nativescript-dev-webpack": "~0.17.0",
"tslint": "~5.11.0",
"typescript": "~2.7.2",
"@angular/compiler-cli": "~6.1.0",
"@ngtools/webpack": "~6.2.0"
},
"readme": "NativeScript Application"
}
我尝试删除和添加平台,删除了node_modules文件夹,然后再次安装了本机脚本,但是没有运气。
添加设备控制台
ActivityManager: Killing 3555:com.google.android.apps.maps/u0a59 (adj 906): empty #17
ActivityManager: Killing 2480:android.process.acore/u0a1 (adj 906): empty #18
ActivityManager: Start proc 5201:com.google.android.apps.wallpaper/u0a73 for broadcast com.google.android.apps.wallpaper/.module.DailyLoggingAlarmReceiver
ActivityManager: Killing 4035:com.google.android.ext.services/u0a12 (adj 906): empty #17
ActivityManager: Start proc 5777:android.process.acore/u0a1 for content provider com.android.providers.contacts/.VoicemailContentProvider
ActivityManager: Killing 3388:com.google.android.gms.ui/u0a13 (adj 906): empty #17