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

it is not working over anrdroid #40

Open
ghost opened this issue Mar 14, 2017 · 10 comments
Open

it is not working over anrdroid #40

ghost opened this issue Mar 14, 2017 · 10 comments

Comments

@ghost
Copy link

ghost commented Mar 14, 2017

my Mainactivity
package com.moa_prod;

import android.os.Bundle;
import com.facebook.react.ReactActivity;
import com.cboy.rn.splashscreen.SplashScreen;

public class MainActivity extends ReactActivity {

/**
 * Returns the name of the main component registered from JavaScript.
 * This is used to schedule rendering of the component.
 */

@Override
protected String getMainComponentName() {
    SplashScreen.show(this);
    return "moa_prod";
}

}

its keep crushing app not working and when i commit the
SplashScreen.show(this);
then nothing happens splash-screen not working .

i did all what readme me say any help please !
here is my MainApplication

package com.moa_prod;

import android.app.Application;

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

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(),
        new VectorIconsPackage()
  );
}

};

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

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

@Jarred-Sumner
Copy link

I'm experiencing this too.

@MeganGilligan1
Copy link

Has anyone found a fix for this? Getting the same answer

@Jarred-Sumner
Copy link

Jarred-Sumner commented Mar 15, 2017 via email

@MeganGilligan1
Copy link

I double checked and its definitely MainActivity! Builds fine but when run on android device just crashes instantly

@Jarred-Sumner
Copy link

Jarred-Sumner commented Mar 15, 2017 via email

@MeganGilligan1
Copy link

Right so got it to work without crashing, folder named incorrectly as layouts rather than layout. Thank you kindly for your help!

@Jarred-Sumner
Copy link

Jarred-Sumner commented Mar 15, 2017 via email

@PARAGJYOTI
Copy link

#52 You must create a layout directory in res folder and put the xml there .

@naveen-iyer-13
Copy link

@PARAGJYOTI the drawable folder should also be in the same levels as layout?

@asinel
Copy link

asinel commented Mar 21, 2018

@PARAGJYOTI it does not help( RN 0.52, Android 7.1

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

5 participants