maxs15 / react-native-spinkit

A collection of animated loading indicators for React Native
MIT License
2.36k stars 300 forks source link

Invariant Violation: Native Component component for "RNSpinkit" does not exist #90

Open johnanisere opened 6 years ago

johnanisere commented 6 years ago

When i tried to use this module I get this Error "Invariant Violation: Native Component component for "RNSpinkit" does not exist"

Here is my code:

import React from 'react';
import { View,Text,TouchableOpacity} from 'react-native';
import styles,{colors} from './styles/style'
import Spinner  from 'react-native-spinkit'

export default class App extends React.Component {

  render() {
    return (
      <View style={styles.container}>
        <View>
          <Spinner isVisible={true} size={100} type='Wave' color='white'/>
        </View>
      </View>
    );
  }
}
ValentinBlokhin commented 6 years ago

the same issue

rob-64 commented 6 years ago

me too

tharzeez commented 6 years ago

It wont work for expo project.

ramey502 commented 6 years ago

@johnanisere "react-antive link" is not finish, and you can jump to these links ios, or android,and I have found whole ios's directory。 If this problem is still exists, you can @ me. 9a229631-dc7a-44d2-be6d-92d422645413 62a2a57c-8fb0-4519-a9b7-dbf1d14c8056

anish000kumar commented 6 years ago

same issue here

minhanhnguyen2196 commented 6 years ago

In your project's folder:

  1. react-native link react-native-spinkit
  2. cd android & gradlew clean
  3. cd .. and react-native run-ios/android Problem solved!
yoaquim commented 6 years ago

Same here. Any updates or official response on this?

MayeuldP commented 6 years ago

Same here, for both android and iOS, anybody can help ?

thorlando commented 6 years ago

For iOS, from your project's root directory:

cd ios/ pod install

A-Happy-Fish commented 6 years ago

cd your project folder react-native link react-native-spinkit reopen your IDE & run

samhoseinkhani commented 5 years ago

doesn't it working on Expo ???

shuiRong commented 5 years ago

@johnanisere "react-antive link" is not finish, and you can jump to these links ios, or android,and I have found whole ios's directory。 If this problem is still exists, you can @ me. 9a229631-dc7a-44d2-be6d-92d422645413 62a2a57c-8fb0-4519-a9b7-dbf1d14c8056

(issue in Android) Thank you. I checked my MainApplication.java file and don't found import com.react.rnspinkit.RNSpinkitPackage; and new RNSpinkitPackage(). It works after I append it.

imbaTao commented 5 years ago
  1. react-native link react-native-spinkit
  2. pod install
ldco2016 commented 5 years ago

Has anyone found a solution for this? There is no RNSpinkit.xcodeproj in my Xcode, I am working with version 10.1. All the other suggestions like react-native link, my rnspinkit is already linked. Where is it supposedly looking for it that it cannot find it?

Its in my MainApplication.java, its in my Loading.js file, its in my package.json file, its in my package-lock.json file, its in my ios/appName.xcodeproj/project.pbxproj file, its in my settings.gradle file and its in my build.gradle file, so where else is it supposed to be that it does not find RNSpinkit?

I am working with React Native 0.53.3 and React 16.2

I have tried everything I have found online short of upgrading react native and I started down that road but it would delete all my AppCenter/ directory.

FortunaRegem commented 5 years ago

I try to link the package but i get this error: Package react-native-spinkit has been ignored because it contains invalid configuration. Reason: "commands" must be an array

Using: react-native 0.60.4

rafaelcavalcante commented 4 years ago

Doesn't seems to work if using Expo.

afrozopsy commented 4 years ago

It may be occuring because one of two reasons,

First, may be package isn't linked correctly. For that,

react-native link should fix it.

Secondly, even if it is linked correctly then the package needs to be imported inside MainApplication.java file. For that,

Add a import at top of file,

import com.react.rnspinkit.RNSpinkitPackage;

and then inside getPackages() method add new RNSpinkitPackage(),

Problem should be fixed.

afrozopsy commented 4 years ago

@rafaelcavalcante it won't work with expo. It uses native modules.

rafaelcavalcante commented 4 years ago

@rafaelcavalcante it won't work with expo. It uses native modules.

We kinda solved this issue. But thanks for the reply, afrozopsy :)

flaviocnn commented 4 years ago

@rafaelcavalcante it won't work with expo. It uses native modules.

We kinda solved this issue. But thanks for the reply, afrozopsy :)

Hi, you solved it? It works with expo? thank you

gurkanguran commented 4 years ago

@rafaelcavalcante it won't work with expo. It uses native modules.

We kinda solved this issue. But thanks for the reply, afrozopsy :)

Can you describe the solution please ?

joe307bad commented 4 years ago

I am also seeing this issue with react-native@0.61.5 and react-native-spinkit@1.5.0

KandarpAjvalia commented 4 years ago

In your project's folder:

  1. react-native link react-native-spinkit
  2. cd android & gradlew clean
  3. cd .. and react-native run-ios/android Problem solved!

if terminal says "command not found: gradlew" run ./gradlew clean

Wentris71 commented 3 years ago

It does not work for android. IOS has been compiled successfully tho. I tried to link this lib manually but app keeps crashing on android.

RN: 0.63.2

vahidpourmohamad commented 2 years ago

@rafaelcavalcante it won't work with expo. It uses native modules.

We kinda solved this issue. But thanks for the reply, afrozopsy :)

Hi, you solved it? It works with expo? thank you

It seems Expo doesn't handle this Library