找不到兼容的NDK并行版本React Native

时间:2020-04-13 17:25:50

标签: android reactjs react-native webrtc

我创建了一个空白的react native应用程序并添加了webrtc包,现在当我在手机上安装react native时,安装后它将自动关闭,我不知道为什么app被关闭。 我在终端中注意到的唯一一件事是,它说未找到 兼容的并行NDK版本。 我的Package.json是

{
  "name": "calling_App",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint ."
  },
  "dependencies": {
    "react": "16.11.0",
    "react-native": "0.62.2",
    "react-native-webrtc": "^1.75.3"
  },
  "devDependencies": {
    "@babel/core": "^7.9.0",
    "@babel/runtime": "^7.9.2",
    "@react-native-community/eslint-config": "^1.0.0",
    "babel-jest": "^25.3.0",
    "eslint": "^6.8.0",
    "jest": "^25.3.0",
    "metro-react-native-babel-preset": "^0.59.0",
    "react-test-renderer": "16.11.0"
  },
  "jest": {
    "preset": "react-native"
  }
}

3 个答案:

答案 0 :(得分:17)

您有NDK Side-by-Side installed?

在Android Studio中检查您的SDK Manager。如果没有,请安装,重新启动工作站,然后尝试再次运行该项目。

enter image description here

答案 1 :(得分:2)

转到File > Project Structure > SDK location,然后在“ Android NDK位置”部分中,输入您的ndk地址位置,如果没有,可以下载它。

答案 2 :(得分:0)

我在 Android Studio 中打开了该项目并运行了一次。现在我也可以从 vscode 运行它