新手求助,运行react-native run-android 时报错



  • D:\project\ReactNative\AwesomeProject>npx react-native run-android
    info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
    Jetifier found 864 file(s) to forward-jetify. Using 4 workers...
    info Starting JS server...
    info Installing the app...

    Task :app:transformClassesWithDexBuilderForDebug FAILED

    Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
    Use '--warning-mode all' to show the individual deprecation warnings.
    See https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:command_line_warnings
    20 actionable tasks: 2 executed, 18 up-to-date

    FAILURE: Build failed with an exception.

    • What went wrong:
      Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.

    com.google.gson.stream.MalformedJsonException: Invalid escape sequence at line 1 column 29 path $[0].name

    • Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run wit
      h --scan to get full insights.

    • Get more help at https://help.gradle.org

    BUILD FAILED in 5s

    error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.githu
    b.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more deta
    ils.
    Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

    FAILURE: Build failed with an exception.

    • What went wrong:
      Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.

    com.google.gson.stream.MalformedJsonException: Invalid escape sequence at line 1 column 29 path $[0].name

    • Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run wit
      h --scan to get full insights.

    • Get more help at https://help.gradle.org

    BUILD FAILED in 5s

    at checkExecSyncError (child_process.js:621:11)
    at execFileSync (child_process.js:639:15)
    at runOnAllDevices (D:\project\ReactNative\AwesomeProject\node_modules\@react-native-community\cli-platform-androi
    

    d\build\commands\runAndroid\runOnAllDevices.js:94:39)
    at buildAndRun (D:\project\ReactNative\AwesomeProject\node_modules@react-native-community\cli-platform-android\bu
    ild\commands\runAndroid\index.js:158:41)
    at D:\project\ReactNative\AwesomeProject\node_modules@react-native-community\cli-platform-android\build\commands
    runAndroid\index.js:125:12
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Command.handleAction (D:\project\ReactNative\AwesomeProject\node_modules\react-native\node_modules@react
    -native-community\cli\build\index.js:164:9)


Log in to reply