Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invariant Violation: requireNativeComponent: "InteractableView" was not found in the UIManager. In "react-native": "0.60.4" only in Android #289

Open
marikani opened this issue Aug 8, 2019 · 13 comments

Comments

@marikani
Copy link

marikani commented Aug 8, 2019

No description provided.

@eminsr
Copy link

eminsr commented Aug 9, 2019

Autolinking is not working at the moment for android thus this error occurs. Related to #288

@itsdante
Copy link

have this problem in iOS as well, tried manual via pods, and even added the podspec file, still no luck, can anyone help ?

@marikani
Copy link
Author

have this problem in iOS as well, tried manual via pods, and even added the podspec file, still no luck, can anyone help ?
Please try these steps:

  1. yarn add https://github.com/wix/react-native-interactable.git#master
  2. Install pods by running cd ios and pod install.

This is working for me in ios, my react native version is 0.60.4.

@marikani marikani reopened this Aug 14, 2019
@itsdante
Copy link

have this problem in iOS as well, tried manual via pods, and even added the podspec file, still no luck, can anyone help ?
Please try these steps:

1. yarn add https://github.com/wix/react-native-interactable.git#master

2. Install pods by running cd ios and pod install.

This is working for me in ios, my react native version is 0.60.4.

This didn't work for me, after days and lack of sleep, finally found something. Make sure Interactable is installed by checking this things

  1. Interactable.podspec is in node_modules/react-native-interactable
  2. Interactable is in ios/Pods

if the above are there, do the following step 👍

Delete Interactable in the podfile, but do not run pod install, interactable will be available in the podfile.lock only

I dont know why but this is what works for me

ISSUES

Sometime interactable will still pop up an error saying uimanager is not found, if this happens just react-native unlink react-native-interactable, npm install directly from the git master, add the podspec and pod install, delete interactable reference in podfile (PROJECT/ios/podfile), clean your build folder from xccode, and run again

@Annihil
Copy link

Annihil commented Sep 13, 2019

No luck for me using master with RN 0.60.5 =(

@harishileaf
Copy link

I am still facing the issue in react-native 0.60.5 for android

@tongngochuunghia
Copy link

With RN 0.60.5, follow the manual link as below:

  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

  1. 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'

  1. 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

-- Done --
This is working for me in android, hope will help you!

@alfathdirk
Copy link

For ios i try to copy code https://github.com/wix/react-native-interactable/blob/master/Interactable.podspec to node_modules/react-native-interactable/Interactable.podspec (create new files)

and add to pod file
pod 'Interactable', :path => '../node_modules/react-native-interactable'

hope will help you

@JonathanVeg
Copy link

With RN 0.60.5, follow the manual link as below:

  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

  1. 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'

  1. 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

-- Done --
This is working for me in android, hope will help you!

I tried it but got the same error and it does not help :(

React Native 0.61.5

@CeamKrier
Copy link

The solution above worked but I had another error about the JUnit and had to comment out the
// testImplementation 'junit:junit:4.12' from the build.gradle of the react-native-interactable. I know its a bad practice to edit node_module files but at least for the sake of trying the library, this step can be taken.

RN 0.59.1

mnzaki added a commit to jolocom/smartwallet-app that referenced this issue Sep 9, 2020
@loveaurell
Copy link

loveaurell commented Oct 11, 2020

To make autolinking work on android, add a file react-native.config with the following contents inside the ./node_modules/react-native-interactable folder:

module.exports = {
dependency: {
platforms: {
android: {
sourceDir: './lib/android',
},
},
},
};

Then you can use patch-package to save this change in a patch.

There's already a pull request for this change but for some reason it has not been merged yet: #288

@loveaurell
Copy link

loveaurell commented Oct 11, 2020

With RN 0.60.5, follow the manual link as below:

  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

  1. 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'

  1. 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

-- Done --
This is working for me in android, hope will help you!

I don't think you need to do this.

To make autolinking work on android, add a file react-native.config with the following contents inside the ./node_modules/react-native-interactable folder:

module.exports = {
dependency: {
platforms: {
android: {
sourceDir: './lib/android',
},
},
},
};

Then you can use patch-package to save this change in a patch.

There's already a pull request for this change but for some reason it has not been merged yet: #288

@DeveloperTheExplorer
Copy link

@loveaurell You have saved me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests