Hi I used This Article to Changing my Splash Screen for android via react native But I Got This Error: Article link
BUILD SUCCESSFUL
Total time: 1 mins 43.179 secs
Running C:\Users\Saeed\AppData\Local\Android\sdk/platform-tools/adb -s 5203fc0e586a3409 reverse tcp:8081 tcp:8081
Starting the app on 5203fc0e586a3409 (C:\Users\Saeed\AppData\Local\Android\sdk/platform-tools/adb -s 5203fc0e586a3409 shell am start -n com.mohajerkade/.MainActivity)...
Starting: Intent { cmp=com.mohajerkade/.MainActivity VirtualScreenParam=Params{mDisplayId=-1, null, mFlags=0x00000000)} }
Error type 3
Error: Activity class {com.mohajerkade/com.mohajerkade.MainActivity} does not exist.
events.js:160
throw er; // Unhandled 'error' event
^
Error: spawn cmd.exe ENOENT
at exports._errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
First I have Splash Screen for 3 secend and After that** I got a red Screen Error calling AppRegistry.runApplication in my mobile** and Can't See React Native Hello World
This is my MainActivity.java :
package com.mohajerkade;
import com.facebook.react.ReactActivity;
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() {
return "Mohajerkade";
}
}
and This is SplashActivity.java :
package com.mohajerkade;
import com.facebook.react.ReactActivity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
public class SplashActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = new Intent(this, MainActivity.class);
startActivity(intent);
finish();
}
}
I Used This Toturial But I Don't Know How Should I See Splash Screen In application loading and after that react native Hello World.
start it fresh, Lets go step by step.
react-native start)Note:
If the phone is connected through USB then connect your system and phone with same wifi, else run adb reverse tcp:8081 tcp:8081
Cheers :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With