简体   繁体   中英

I am trying to open the React Native application but I have this problem What is the solution?

$ react-native run-android
error React Native CLI uses autolinking for native dependencies, but the following modules are linked manually:
  - @react-native-community/geolocation (to unlink run: "react-native unlink @react-native-community/geolocation")
  - react-native-bluetooth-status (to unlink run: "react-native unlink react-native-bluetooth-status")
  - react-native-device-info (to unlink run: "react-native unlink react-native-device-info")
  - react-native-i18n (to unlink run: "react-native unlink react-native-i18n")
  - react-native-image-picker (to unlink run: "react-native unlink react-native-image-picker")
  - react-native-ux-cam (to unlink run: "react-native unlink react-native-ux-cam")
  - react-native-vector-icons (to unlink run: "react-native unlink react-native-vector-icons")

This is likely happening when upgrading React Native from below 0.60 to 0.60 or above. Going forward, you can unlink this dependency via "react-native unlink " and it will be included in your app automatically. If a library isn't compatible with autolinking, disregard this message and notify the library maintainers. Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag. Jetifier found 1225 file(s) to forward-jetify. Using 4 workers... info JS server already running. info Installing the app... Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details

FAILURE: Build failed with an exception.

  • Where: Build file 'C:\Users\User\Documents\GitHub\walleterp-mobile\node_modules@react-native-community\geolocation\android\build.gradle' line: 21

  • What went wrong: A problem occurred evaluating project ':@react-native-community_geolocation'.

    Failed to apply plugin [id 'com.android.library']

I have same issues in my last project, You can try to unlink with this command: react-native unlink And remove all dependencies: yarn remove or npm-uninstall And you delete the yarn.lock, package-lock.json and npm-package-lock.json

And delete the "build" folder in the folder 'Android', Then u can reinstall with yarn install or npm-install, And try react-native run-android,

Personnally I have created a new project and reinstall all depedencies without react-native link, because this bug is a configuration problems and appear with the new version of React Native,

Hope it will help you

just delete the build folder and try again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM