Android folder after Expo Eject

After expo eject the MainActivity in the android folder in my project is inside a test package and looks like this:

package com.test;

import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactRootView;
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;

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 "test";
}

@Override
protected ReactActivityDelegate createReactActivityDelegate() {
    return new ReactActivityDelegate(this, getMainComponentName()) {
        @Override
        protected ReactRootView createRootView() {
            return new RNGestureHandlerEnabledRootView(MainActivity.this);
        }
    };
}

}

I am a total beginner in React Native and was wondering if it looks like this for everyone. I was expecting it to have a onCreate method.
Thank you in advance!

Hi! It’s normal for it not to have an onCreate method, but if you need one then you can just add it! This has actually been asked about before :+1:

1 Like

Thank u so much !