Javascript Android NativeScript路径必须是字符串。接收未定义

Javascript Android NativeScript路径必须是字符串。接收未定义,javascript,android,typescript,visual-studio-code,nativescript,Javascript,Android,Typescript,Visual Studio Code,Nativescript,我是NativeScript的新手,我正在尝试在Visual Studio代码上导入/打开现有的NatriveScript项目,我已安装了节点,NativeScript 3.0.3,当我尝试构建或运行该项目时,我从调试控制台获得此信息 [NativeScriptCli] execute: tns --analyticsClient VSCode --version [NSDebugAdapter] Using tns CLI v3.0.3 on path 'tns' [NSDebugAdapte

我是NativeScript的新手,我正在尝试在Visual Studio代码上导入/打开现有的NatriveScript项目,我已安装了节点,NativeScript 3.0.3,当我尝试构建或运行该项目时,我从调试控制台获得此信息

[NativeScriptCli] execute: tns --analyticsClient VSCode --version
[NSDebugAdapter] Using tns CLI v3.0.3 on path 'tns'
[NSDebugAdapter] Running tns command...
[NativeScriptCli] execute: tns --analyticsClient VSCode debug android --no-client --watch 
[NSDebugAdapter] Watching the tns CLI output to receive a connection token
Searching for devices...
Executing before-prepare hook from c:\Dev\QAP\Mobile app\hooks\before-prepare\nativescript-dev-android-snapshot.js
[31;1mPath must be a string. Received undefined
[NSDebugAdapter] The tns command finished its execution with code 127.
Error: Unknown signal: SIGQUIT
这是我的package.json

{
  "name": "tns-template-hello-world-ts",
  "main": "app.js",
  "version": "2.4.0",
  "author": "Telerik <support@telerik.com>",
  "description": "Nativescript hello-world-ts project template",
  "license": "Apache-2.0",
  "keywords": [
    "telerik",
    "mobile",
    "nativescript",
    "{N}",
    "tns",
    "appbuilder",
    "template"
  ],
  "repository": {
    "type": "git",
    "url": "git@github.com:NativeScript/template-hello-world-ts.git"
  },
  "bugs": {
    "url": "https://github.com/NativeScript/template-hello-world-ts/issues"
  },
  "homepage": "https://github.com/NativeScript/template-hello-world-ts",
  "android": {
    "v8Flags": "--expose_gc"
  },
  "dependencies": {
    "moment": "^2.11.2",
    "nativescript-background-http": "^2.5.1",
    "nativescript-camera": "0.0.8",
    "nativescript-checkbox": "^1.2.2",
    "nativescript-drop-down": "^1.4.0",
    "nativescript-floatingactionbutton": "^2.1.3",
    "nativescript-fresco": "^1.0.13",
    "nativescript-imagepicker": "^2.4.1",
    "nativescript-permissions": "^1.2.1",
    "nativescript-pulltorefresh": "^1.1.9",
    "nativescript-social-share": "^1.3.1",
    "nativescript-telerik-ui": "^0.2.4",
    "nativescript-theme-core": "^0.2.1",
    "nativescript-toast": "^1.4.5",
    "nativescript-videoplayer": "^1.1.4",
    "nativescript-videorecorder": "^1.3.4",
    "tns-core-modules": "^2.5.2"
  },
  "devDependencies": {
    "nativescript-dev-typescript": "^0.3.2",
    "nativescript-dev-android-snapshot": "^0.*.*"
  }
}

尝试重新添加android平台吗?@HardikVaghani运行tns platform remove android时,我得到spawn gradlew.bat enoint#platform remove┌───────┬──────────┐ │ 用法│ 提要│ │ │ └───────┴──────────┘ 常规|$tns platform remove android将从项目当前目标的平台中删除选定的平台。删除目标平台后,您无法再在该平台上运行的设备上构建和部署应用程序。只删除
platforms
dir怎么样?tns platform remove命令依赖于首先正确设置的platforms目录。如果npm软件包已损坏,或者在提取过程中发生了问题,您将无法
tns平台删除android
它。我已降级我的NativeScript,这是我得到的,处理节点_模块失败。异常:找不到兼容的Android SDK进行编译。要能够为Android构建,请安装Android SDK 22或更高版本。我已经安装了android SDK,设置了android home变量Roger,请确保还导出了相对于您的android_home环境变量的
平台工具
工具
{
    "version": "0.2.0",
    "configurations": [

        {
            "name": "Launch on Android",
            "type": "nativescript",
            "request": "launch",
            "platform": "android",
            "appRoot": "${workspaceRoot}",
            "sourceMaps": true,
            "watch": true
        },
        {
            "name": "Attach on Android",
            "type": "nativescript",
            "request": "attach",
            "platform": "android",
            "appRoot": "${workspaceRoot}",
            "sourceMaps": true,
            "watch": false
        }
    ]
}