maxs15 / react-native-spinkit

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

Plugin not works for me #23

Closed snsoft221 closed 8 years ago

snsoft221 commented 8 years ago

I am using your module for my project

/**

import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View, TouchableOpacity } from 'react-native';

var Spinner = require('react-native-spinkit');

var MainPage = React.createClass({

render()
{
    return(
        <View style={styles.container}>
            <Spinner isVisible={true} size={120} type="Pulse" color="#00ff00"/>
        </View>
    );
}

});

var styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#ffffff' } }); export default MainPage;

But when I display this page I get only rectangle with red border. Can you please tell me what's wrong in my project?

adamjacob commented 8 years ago

I had the same issue, I quit simulator and ran the project again. Works perfect now 😄

wkh237 commented 8 years ago

Try close packager and restart it again, looks like native modules not got linked

maiklez commented 8 years ago

I have the same issue, I try to restart the packager, the simulator, the app in the phone and the computer :) but nothing change.

I still have the rectangle with red border.

maxs15 commented 8 years ago

The red border means the native library isn't linked to your project

matthewwoop commented 8 years ago

@angel3509268 @maiklez

be sure to link the native library with as it says in the README

rnpm link react-native-spinkit

maiklez commented 8 years ago

yes! that was the problem! Thanks! Solved for me!

karan101292 commented 6 years ago

There is a problem with rnpm link react-native-spinkit. Sometimes it adds RNSpinkitPackage dependency to MainActivity.java instead of MainApplication.java

Solution: Follow this step manually https://github.com/maxs15/react-native-spinkit/wiki/Manual-linking---Android#in-androidappsrcmainjavacomexamplemainapplicationjava-add-the-rnspinkitpackage-dependency