大佬求助,为什么引入一个组件启动项目报错



  • FAILURE: Build failed with an exception.

    • Where:
      Build file 'C:\Users\lenovo\Desktop\Weilink\node_modules\react-native-device-info\android\build.gradle' line: 50

    • What went wrong:
      A problem occurred evaluating project ':react-native-device-info'.

    Could not find method implementation() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

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

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

    BUILD FAILED in 25s
    Could not install the app on the device, read the error above for details.
    Make sure you have an Android emulator running or a device connected and have
    set up your Android development environment:
    https://facebook.github.io/react-native/docs/android-setup.html



  • implementation()是gradle3的语法,说明你的gradle版本低于3,进一步说明你rn版本太低


Log in to reply