Hello guys
Context :
Bare
Expo SDK 41
At build time i got those two buddies :
/build/workingdir/build/android/app/src/main/java/com/satyamdorville/discover/MainActivity.java:34: error: method does not override or implement a method from a supertype
And :
/build/workingdir/build/android/app/src/main/java/com/satyamdorville/discover/MainActivity.java:36: error: cannot find symbol
...
symbol: method getMainComponentName())
And here is my mainActivity.java :
Any tips ?
package com.satyamdorville.discover;
import android.content.res.Configuration;
import android.content.Intent;
import android.os.Bundle;
import com.reactnativenavigation.NavigationActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactRootView;
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
import expo.modules.splashscreen.singletons.SplashScreen;
import expo.modules.splashscreen.SplashScreenImageResizeMode;
public class MainActivity extends NavigationActivity {
// Added automatically by Expo Config
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
Intent intent = new Intent("onConfigurationChanged");
intent.putExtra("newConfig", newConfig);
sendBroadcast(intent);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(null);
// SplashScreen.show(...) has to be called after super.onCreate(...)
// Below line is handled by '@expo/configure-splash-screen' command and it's discouraged to modify it manually
SplashScreen.show(this, SplashScreenImageResizeMode.CONTAIN, ReactRootView.class, false);
}
@Override
protected ReactActivityDelegate createReactActivityDelegate() {
return new ReactActivityDelegate(this, getMainComponentName()) {
@Override
protected ReactRootView createRootView() {
return new RNGestureHandlerEnabledRootView(MainActivity.this);
}
};
}
}
And package.json :
{
"scripts": {
"start": "react-native start",
"android": "react-native run-android",
"ios": "react-native run-ios",
"web": "expo start --web",
"eject": "expo eject",
"test": "jest --watchAll"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"@expo/vector-icons": "^12.0.0",
"@react-native-async-storage/async-storage": "^1.13.0",
"@react-native-community/cli-platform-ios": "^5.0.1-alpha.2",
"@react-native-community/masked-view": "^0.1.11",
"@react-navigation/bottom-tabs": "5.11.2",
"@react-navigation/native": "^5.9.4",
"@react-navigation/stack": "~5.12.8",
"@reduxjs/toolkit": "^1.5.1",
"@sentry/react-native": "^2.4.3",
"@stripe/stripe-react-native": "^0.1.2",
"@types/react-native-snap-carousel": "^3.8.3",
"email-validator": "^2.0.4",
"expo": "^41.0.0",
"expo-asset": "~8.3.1",
"expo-constants": "~10.1.3",
"expo-font": "^9.1.0",
"expo-linking": "^2.2.3",
"expo-location": "^12.0.4",
"expo-permissions": "^12.0.1",
"expo-splash-screen": "~0.10.2",
"expo-status-bar": "^1.0.4",
"expo-updates": "~0.5.4",
"expo-web-browser": "~9.1.0",
"moment-timezone": "^0.5.33",
"parse": "^3.1.0",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "~0.63.4",
"react-native-animatable": "^1.3.3",
"react-native-appearance": "~0.3.3",
"react-native-dropdown-picker": "^5.1.15",
"react-native-elements": "^3.3.2",
"react-native-gesture-handler": "^1.10.3",
"react-native-modal": "^11.10.0",
"react-native-navigation": "^7.12.0",
"react-native-numeric-input": "^1.9.0",
"react-native-paper": "^4.8.1",
"react-native-reanimated": "^2.1.0",
"react-native-render-html": "^5.1.0",
"react-native-safe-area-context": "^3.2.0",
"react-native-screens": "^3.3.0",
"react-native-snap-carousel": "^3.9.1",
"react-native-stripe-checkout-webview": "0.0.13",
"react-native-ui-lib": "^5.22.0",
"react-native-unimodules": "~0.13.3",
"react-native-vector-icons": "^8.1.0",
"react-native-web": "~0.13.12",
"react-native-webview": "^11.2.3",
"react-navigation": "^4.4.4",
"react-redux": "^7.2.3",
"react-ridge-state": "^4.2.1",
"redux": "^4.0.5",
"sentry-expo": "^3.1.0"
},
"devDependencies": {
"@babel/core": "^7.9.6",
"@types/lodash": "^4.14.168",
"@types/react": "~16.9.35",
"@types/react-native": "~0.63.2",
"@types/react-redux": "^7.1.16",
"jest-expo": "^41.0.0",
"redux-tools": "^3.2.0",
"typescript": "~4.0.0"
},
"private": true,
"name": "discover",
"version": "1.0.0"
}