求大佬救助:Cannot get property 'packageName' on null object



  • 我在运行 react-native run-android 后就报Cannot get property 'packageName' on null object, 具体报错信息如下,求大佬搭救!

    FAILURE: Build failed with an exception.

    • Where:
      Script 'D:\codes\react_native_test\node_modules@react-native-community\cli-platform-android\native_modules.gradle' line: 206
    • What went wrong:
      A problem occurred evaluating script.

    Cannot get property 'packageName' on null object

    • Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    • Get more help at https://help.gradle.org
      BUILD FAILED in 33s
      error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
      Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
      FAILURE: Build failed with an exception.
    • Where:
      Script 'D:\codes\react_native_test\node_modules@react-native-community\cli-platform-android\native_modules.gradle' line: 206
    • What went wrong:
      A problem occurred evaluating script.
      Cannot get property 'packageName' on null object
    • Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    • Get more help at https://help.gradle.org
      BUILD FAILED in 33s
      at checkExecSyncError (child_process.js:618:11)
      at execFileSync (child_process.js:636:13)
      at runOnAllDevices (D:\codes\react_native_test\node_modules@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:39)
      at process.internalTickCallback (internal/process/next_tick.js:77:7)

Log in to reply