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

undefined is not an object on calling hide() #30

Open
georgemickael-b opened this issue Feb 20, 2017 · 15 comments
Open

undefined is not an object on calling hide() #30

georgemickael-b opened this issue Feb 20, 2017 · 15 comments

Comments

@georgemickael-b
Copy link

No description provided.

@carlesnunez
Copy link

Any news on that? I have the same problem

@georgemickael-b
Copy link
Author

@carlesnunez Do manual installation. It worked.

@carlesnunez
Copy link

carlesnunez commented Feb 28, 2017

Worked! Especifically the link was not adding the package on MainApplication.java you should have a main application like this:

package com.keradgames.leader;

import android.app.Application;
import android.util.Log;

import com.facebook.react.ReactApplication;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;
import com.cboy.rn.splashscreen.SplashScreenReactPackage;

import java.util.Arrays;
import java.util.List;

public class MainApplication extends Application implements ReactApplication {

  private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
    @Override
    public boolean getUseDeveloperSupport() {
      return BuildConfig.DEBUG;
    }

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

  @Override
  public ReactNativeHost getReactNativeHost() {
    return mReactNativeHost;
  }

  @Override
  public void onCreate() {
    super.onCreate();
    SoLoader.init(this, /* native exopackage */ false);
  }
}

@derekrivers
Copy link

Im still getting this error, I've checked my MainApplication.java file and its exactly as above.

@se1exin
Copy link

se1exin commented Mar 16, 2017

Just chiming in, I get this also when running jest (ie RN tests). There are no errors when running on an emulator/device though

@chilion
Copy link

chilion commented Apr 10, 2017

I have it on IOS

@goroya
Copy link

goroya commented Sep 10, 2017

me too on Android.
I use RN48.

@Flavien
Copy link

Flavien commented Sep 27, 2017

I followed the manual steps, still having this error. Was there a solution?

@ahmedtehseen
Copy link

ahmedtehseen commented Oct 1, 2017

In MainApplication.java I have used.
import org.devio.rn.splashscreen.SplashScreenReactPackage;
instead of.
import com.cboy.rn.splashscreen.SplashScreenReactPackage;
it solved my problem.

@liuhuangping
Copy link

same problem!!! android

@nschurmann
Copy link

Same issue, iOS

@liangfenxiaodao
Copy link

Same issue when running jest

@Noor0
Copy link

Noor0 commented Jun 28, 2018

same issue on both android and ios my RN version is 55.4

@mjstelly
Copy link

Hasn't been a commit since Sep 2018. Don't think anyone is supporting this anymore. Too bad.

@vishal-km
Copy link

react-native link react-native-splash-screen
Fixed the issue.

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