react-native-spinkit icon indicating copy to clipboard operation
react-native-spinkit copied to clipboard

React 0.29 weird red square

Open jr-k opened this issue 9 years ago • 12 comments

I followed the example and I got this : https://puu.sh/qaxut/98de9b9ccd.png

Do you have an idea of what is the cause ?

Thanks !

jr-k avatar Jul 22 '16 13:07 jr-k

I get this too, but only when I try it with android. It works great on IOS

SHRoberts91 avatar Jul 22 '16 16:07 SHRoberts91

Tried on IOS still got that square.

Another guy got this one too on android (below on comments of this post) : http://www.reactnative.com/a-collection-of-animated-loading-indicators-for-react-native/

jr-k avatar Jul 22 '16 16:07 jr-k

+1

jmitch0901 avatar Jul 23 '16 19:07 jmitch0901

Because react native change Android application template in 0.29, rnpm link is broken in 0.29.0~0.29.1, see this issue.

You can fix this by link the Android library manually, or just upgrade your project

$ react-native upgrade

remember to rnpm link after upgrade.

wkh237 avatar Jul 24 '16 03:07 wkh237

I took those steps, but still having the same problem on android. :/

SHRoberts91 avatar Jul 26 '16 23:07 SHRoberts91

Same here!, weird red square.

nschurmann avatar Aug 03 '16 20:08 nschurmann

The solution for android: in your MainActivity.java, cut the import for this plugin

import com.react.rnspinkit.RNSpinkitPackage;

and add it to your MainApplication.java, then in your getPackages() method, add a new package:

new RNSpinkitPackage()

should look like this:

@Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
          new FBSDKPackage(mCallbackManager),
          new RNSpinkitPackage()
      );
    }

nschurmann avatar Aug 03 '16 20:08 nschurmann

That worked!! Thanks @nschurmann, you're a boss :)

SHRoberts91 avatar Aug 03 '16 23:08 SHRoberts91

hb for ios ?

crod93 avatar Aug 06 '16 22:08 crod93

The RNPM script has been updated for Android, should be easier now for RN 0.29+ thanks to @wkh237 !

maxs15 avatar Aug 22 '16 13:08 maxs15

same issue. Followed manual setup guide: https://github.com/maxs15/react-native-spinkit/wiki/Manual-linking---Android

Found that the linking hadn't worked properly in Android java files and fixed it accordingly

This solved the issue!1 💃 YAY

Great react-native component. Thanks =D

DeveloperAlly avatar Jan 05 '17 15:01 DeveloperAlly

I get it too in a new project, but it is normal in Example for React native 0.42.

SSRen avatar Mar 04 '17 20:03 SSRen