please attach your setting.gradle and build.gradle as well
@jp928 This is my build.gradle file:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
}
And this my settings.gradle file:
rootProject.name = 'example'
include ':app'
include ':react-native-interactable'
project(':react-native-interactable').projectDir = new File(rootProject.projectDir, '../../android')
Im getting the same error as @singhalpk
@singhalpk @andresgala
This is caused by the postInstall in the package.json in this library. If you wanna to research deeper, you may need to check the package.json in this library:
"postinstall": "ln -sf lib/{ios,android} ."
which is trying to create a softlink from ./node_modules/react-native-interactable/lib/android to the project root folder. Unfortunately, this is not a valid windows command. Thus, the fix is quite simple, you can modify your settings.gradle to fix the path as below:
include ':react-native-interactable'
project(':react-native-interactable').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-interactable/lib/android')
What could possibly motivate the devs on this project to introduce the potential for failure of a softlink for seemingly no good reason whatsoever? What's wrong with having /lib/ in the path?
This issue is fixed in #211. Would be nice to get it merged and stop this torrent of installing problems.
in terminal install npm again:
$npm install
Please run this command react-native upgrade. This command will ask replace existing file or not. If you want to replace a particular file press Y and hit enter button or press N. After completing this command than run command react-native link. This command will link all dependencies than you can run command react native run-android /ios. This issue create when you uninstall some dependencies so sometimes it do not update build files like setting.gradle build.gradle etc.
I am closing the issue as a part of an effort to cleanup and revive the project. If this issue persists after v1.0.0, you are more than welcome to reintroduce the issue.
Thanks for your contribution.
in terminal install npm again:
$npm install
solve my issue thank u sir
Most helpful comment
@singhalpk @andresgala
This is caused by the postInstall in the package.json in this library. If you wanna to research deeper, you may need to check the package.json in this library:
which is trying to create a softlink from ./node_modules/react-native-interactable/lib/android to the project root folder. Unfortunately, this is not a valid windows command. Thus, the fix is quite simple, you can modify your settings.gradle to fix the path as below: