
Anyone have any idea how this could be fixed? I installed and linked the package as instructed, and I've imported Interactable into my project. Not sure why this is showing up.
I have facing same issue. Any solution ?
What are your RN versions _etc_?
Me too... trying to build for iOS.
This is my package.json
├── @babel/[email protected]
├── @babel/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] extraneous
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
Facing same issue bud!
Got this issues on android as well
For android: You need to link react-native-interactable
add in /android/settings.gradle: //Make sure the path is correct in node_modules, it might change due to version
include ':react-native-interactable'
project(':react-native-interactable').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-interactable/lib/android')
add in /android/app/build.gradle:
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
...
implementation project(path: ':react-native-interactable')
}
In MainApplication.java import and instantiate Iteractable.
import com.wix.interactable.Interactable;
...
protected List<ReactPackage> getPackages() {
// Add additional packages you require here
// No need to add RnnPackage and MainReactPackage
return Arrays.<ReactPackage>asList(
new Interactable()
// eg. new VectorIconsPackage()
);
}
same me on iOS. any solution?
@phonganhhung9xtb what I did for IOs was to link (react-native link react-native-interactable) the lib and then did this
Manually link via Cocoa Pods (iOS)
Add the following to your Podfile and run pod update:
pod 'Interactable', :path => '../node_modules/react-native-interactable'
@phonganhhung9xtb what I did for IOs was to link (react-native link react-native-interactable) the lib and then did this
Manually link via Cocoa Pods (iOS)
Add the following to your Podfile and run pod update:
pod 'Interactable', :path => '../node_modules/react-native-interactable'
yes! i just resolve it as your way :)) thank anyway!
How to fix this in expo?
Got this issues on android as well. @leojle, your android solution doesnt fix it.
I'm getting the same error too.. This all didn't fixed Android problem.
How to fix this in expo?
You will need to eject from Expo.
Expo does not allow 'linking'.
I hope it helps who are using Expo.
How to fix this in expo?
You have any solution for this error in Expo.I am new to expo.
in the version I'm using 0.62.2 it's working, follow the manual link as below:
version "react-native-interactable": "^2.0.1"
android/app/build.gradle > dependencies
implementation "com.facebook.react:react-native:+" // From node_modules
// https://github.com/wix/react-native-interactable
implementation project(path: ":react-native-interactable") <-- Add this line
android/settings.gradle
rootProject.name = 'yourappname'
apply from: file("../node_modules/@react-native-community/cli-platform->
android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':react-native-interactable' <-- Add this line
project(':react-native-interactable').projectDir = new File(rootProject.projectDir,
'../node_modules/react-native-interactable/lib/android') <-- Add this line
include ':app'
3.android/app/src/main/java/.../MainApplication.java
import com.wix.interactable.Interactable; <-- Add this line
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
packages.add(new Interactable()); <-- Add this line
I hope for you too
As @DanleyCr7 specified, you have to manually link the library. Follow his instructions.
Most helpful comment
For android: You need to link react-native-interactable
add in /android/settings.gradle: //Make sure the path is correct in node_modules, it might change due to version
add in /android/app/build.gradle:
In MainApplication.java import and instantiate Iteractable.