【问题标题】:cordova-debug-adapter Error: Unable to find pid ionic 2cordova-debug-adapter 错误:无法找到 pid ionic 2
【发布时间】:2023-03-26 07:48:02
【问题描述】:

我正在使用 ionic 开发我的应用程序,我想在移动设备而不是模拟器上调试我的应用程序。它在 Windows 中完美运行,但不能在 ubuntu 或 macintosh 上启动。 我还在设备上启用了 USB 调试,正如我所说的在 Windows 中完美运行。 这是我的离子信息

块引用

Cordova CLI: 6.3.1
Ionic CLI Version: 2.0.0-beta.32
Ionic App Lib Version: 2.0.0-beta.18
OS: Distributor ID: Ubuntu Description: Ubuntu 16.04 LTS
Node Version: v6.4.0

这是我的 launch.json,

 {
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Run Android on device",
            "type": "cordova",
            "request": "launch",
            "platform": "android",
            "target": "device",
            "port": 9222,
            "sourceMaps": true,
            "cwd": "${workspaceRoot}",
            "ionicLiveReload": false
        },
        {
            "name": "Run iOS on device",
            "type": "cordova",
            "request": "launch",
            "platform": "ios",
            "target": "device",
            "port": 9220,
            "sourceMaps": true,
            "cwd": "${workspaceRoot}",
            "ionicLiveReload": false
        },
        {
            "name": "Attach to running android on device",
            "type": "cordova",
            "request": "attach",
            "platform": "android",
            "target": "device",
            "port": 9222,
            "sourceMaps": true,
            "cwd": "${workspaceRoot}"
        },
        {
            "name": "Attach to running iOS on device",
            "type": "cordova",
            "request": "attach",
            "platform": "ios",
            "target": "device",
            "port": 9220,
            "sourceMaps": true,
            "cwd": "${workspaceRoot}"
        },
        {
            "name": "Run Android on emulator",
            "type": "cordova",
            "request": "launch",
            "platform": "android",
            "target": "emulator",
            "port": 9222,
            "sourceMaps": true,
            "cwd": "${workspaceRoot}",
            "ionicLiveReload": false
        },
        {
            "name": "Run iOS on simulator",
            "type": "cordova",
            "request": "launch",
            "platform": "ios",
            "target": "emulator",
            "port": 9220,
            "sourceMaps": true,
            "cwd": "${workspaceRoot}",
            "ionicLiveReload": false
        },
        {
            "name": "Attach to running android on emulator",
            "type": "cordova",
            "request": "attach",
            "platform": "android",
            "target": "emulator",
            "port": 9222,
            "sourceMaps": true,
            "cwd": "${workspaceRoot}"
        },
        {
            "name": "Attach to running iOS on simulator",
            "type": "cordova",
            "request": "attach",
            "platform": "ios",
            "target": "emulator",
            "port": 9220,
            "sourceMaps": true,
            "cwd": "${workspaceRoot}"
        },
        {
            "name": "Serve to the browser (ionic serve)",
            "type": "cordova",
            "request": "launch",
            "platform": "serve",
            "cwd": "${workspaceRoot}",
            "devServerAddress": "localhost",
            "sourceMaps": true,
            "ionicLiveReload": true
        },
        {
            "name": "Simulate Android in browser",
            "type": "cordova",
            "request": "launch",
            "platform": "android",
            "target": "chrome",
            "simulatePort": 8000,
            "livereload": true,
            "sourceMaps": true,
            "cwd": "${workspaceRoot}"
        },
        {
            "name": "Simulate iOS in browser",
            "type": "cordova",
            "request": "launch",
            "platform": "ios",
            "target": "chrome",
            "simulatePort": 8000,
            "livereload": true,
            "sourceMaps": true,
            "cwd": "${workspaceRoot}"
        }
    ]
}

【问题讨论】:

    标签: cordova angular visual-studio-code ionic2


    【解决方案1】:

    这是迟到的帖子,但可能会对某人有所帮助。

    我遇到了同样的问题,解决方法是去**SDK Manager** 并下载我尝试在其上运行我的应用程序的设备的 android 版本。

    【讨论】:

    • 在您的手机上运行该应用程序时,您应该会在手机上弹出一个窗口,询问您是否允许安装您正在运行的应用程序。如果你安装了 sdk
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-02-27
    • 1970-01-01
    • 1970-01-01
    • 2020-04-20
    • 2017-08-22
    • 2021-07-13
    • 1970-01-01
    相关资源
    最近更新 更多