React-native-interactable: Native component for InteractableView does not exist

Created on 16 Apr 2018  路  7Comments  路  Source: wix/react-native-interactable

Hi!
I've tried this module. I followed Installation instruction:

  • Install the package from npm

npm install react-native-interactable --save

  • Link the native library to your project

react-native link react-native-interactable

However, I see only one line show:

rnpm-install info iOS module react-native-interactable is already linked

Mean android haven't linked yet?

Actually I tried running in Android devices, the following error show:

Native component for "InteractableView" does not exist

I also add this line to package.json - dependencies:

"react-native-interactable": "https://github.com/wix/react-native-interactable.git#d8c8f08f2b805070eac333124149ce87132a986e",

Still same error..

Can you show me how to link Android module?
Thanks!

Most helpful comment

Hi!
Tried your linking instruction. It shows new error:

A problem occurred configuring project ':app'.
Could not resolve all dependencies for configuration ':app:_debugApk'.
Configuration with name 'default' not found.

I looked at react-native-interactable module, and I think that we should add lib to you projectDir setting on android/settings.gradle:

include ':react-native-interactable'
roject(':react-native-interactable').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-interactable/lib/android')

Please confirm if I'm right.

All 7 comments

Hi, the linking process should also link android. Can you try to unlink react-native-interactable and link it again?

Otherwise i will update the README with the manual instructions for android.
To proceed, make sure that the following parts are set:

implement under debendencies in android/app/build.gradle
compile project(':react-native-interactable')

In andoird/app/src/.../MainApplication.java
top:
import com.wix.interactable.Interactable;

inside your getPackages List insert Interactable
new MainReactPackage(), new Interactable()

in android/settings.gradle import package from node_modules:
include ':react-native-interactable' project(':react-native-interactable').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-interactable/android')

I tried unlinking but still same. I will try linking manually.
Thanks for your support!

Hi!
Tried your linking instruction. It shows new error:

A problem occurred configuring project ':app'.
Could not resolve all dependencies for configuration ':app:_debugApk'.
Configuration with name 'default' not found.

I looked at react-native-interactable module, and I think that we should add lib to you projectDir setting on android/settings.gradle:

include ':react-native-interactable'
roject(':react-native-interactable').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-interactable/lib/android')

Please confirm if I'm right.

I also tried with above edited configurations. It worked I think, pass that phase, but other error:

/home/rat/work-space/Mallin-app/node_modules/react-native-interactable/lib/android/src/main/java/com/wix/interactable/Interactable.java:19: error: method does not override or implement a method from a supertype
@Override

Please help me handle it.
Thanks!

I think I found problem.
Your function createJSModules has been deprecated: oblador/react-native-vector-icons#515. You should remove it.
I tried commenting this function, now can build. Praying for me to get no issue more hehe.

Hi Guys,
In my case I was debugging my app over WiFi with packager running with react-native start and I simply connect the phone into USB cable and re-runreact-native run-android and worked.

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

Thanks for your contribution.

Was this page helpful?
0 / 5 - 0 ratings