'Project with path ':react-native-community_checkbox' could not be found in project ':app'

I tried to add "@react-native-community/checkbox" to my React-Native project. When i run command "react-native run-ios" everything works fine but when i try to run "react-native run-android" i got the error

FAILURE: Build failed with an exception.

  • Where: Script '/Users/../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle' line: 124

  • What went wrong: A problem occurred evaluating project ':app'. Project with path ':react-native-community_checkbox' could not be found in project ':app'.

in settings.gradle linking look like

include ':@react-native-community_checkbox' project(':@react-native-community_checkbox').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/checkbox/android')

I stuck this problem for 3 days can anyone give any advice pls?



Solution 1:[1]

Uninstall library and delete build folder and app cache Then try it again

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Vismaya Haridas