Module AppRegistry is not registered callable module (calling runApplication)
I was using native base for my app here is link native base
and you can see there is no app registry like this
AppRegistry.registerComponent('Point', () => Point)
but i have to do this to run my app
React-Native: Module AppRegistry is not a registered callable module
i just upgraded to react-native 0.18.1
today tough having some peer dependencies issues with 0.19.0-rc
pre-release version.
Back to your question, what I did was
cd android
sudo ./gradlew clean
(more information about how clean works here)
then back to the working directory and runreact-native run-android
you should restart your npm too after that upgrade.
hope this works for you.
Invariant Violation: Module `AppRegistry` is not a registered callable module (calling `runApplication`). and etc
try to add this line in your babel.config.js file; Then run again, may be helps you
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
"react-native-reanimated/plugin"
]
};
React Native - Module AppRegistry is not a registered callable module
Fixed the issue on my end by double checking that i modified all the files correctly during my RN upgrade, then running watchman watch-del-all
, and react-native start --reset-cache
. Then on android, build -> clean. then it worked! sigh
Specific solution of your question
I found a wrong initialization of appContainer. you can fix as below
const AppContainer = createAppContainer(SignedInTabNav);
class App extends React.Component {
render() {
return <AppContainer />;
}
}
export default App;
react navigation drawer giving me Invariant Violation: Module AppRegistry is not a registered callable module
So~ this happened because of not properly installing react-native-reanimated(very common reason for the invariant Violation: Module AppRegistry is not a registered callable module),
to solve this issue just follow the documentation on the react-native-reanimated website
https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation/
step 1:
in babel.config.js
module.exports = {
...
plugins: [
...
'react-native-reanimated/plugin',//Add this
],
};
step 2:
in android/app/build.gradle
project.ext.react = [
enableHermes: true // <-change this to true
]
step 3 : in MainApplication.java
import com.facebook.react.bridge.JSIModulePackage; // <- add
import com.swmansion.reanimated.ReanimatedJSIModulePackage; // <- add
...
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
...
@Override
protected String getJSMainModuleName() {
return "index";
}
///////////////////////////////////////////////////
@Override
protected JSIModulePackage getJSIModulePackage() { <- add this block
return new ReanimatedJSIModulePackage(); //
}
///////////////////////////////////////////////////
};
step 4 : in terminal
cd android
./gradlew clean
cd ../
step 5 : just to be safe
npx react-native run-android -- --reset-cache
Related Topics
How to Change the Default Height of a Bottomsheetdialog
How to Remove Bottom Navigation View and Toolbar in Some Fragments If Using Navigation Controller
How to Clear Navigation Stack After Navigating to Another Fragment in Android
How to Restrict Entry of Numbers But Allow All the Special Characters and Alphabets in Edittext
Videoview to Match Parent Height and Keep Aspect Ratio
How to Create an Android View Pager With a Dots Indicator
How to Display a Loading Spinner While Getting Data from Firestore
How to Receive Fcm Push Notifications When App Is Killed
How to Remove Unnecessary Margins from Toolbar
Retrofit Body Giving Null Values But Coming Perfect in Postman
How to Get the Json Response of a Post Request in a Webview
Getting Net::Err_Connection_Refused (Http://Localhost:8080) on Android 4.4.2 Version
How to Install the App Twice Without Interference in Android
Setting Onclicklistener for the Drawable Right of an Edittext
Apk Signing Error:Failed to Read Key from Keystore
Programmatically Retrieve Imei Number for Dual Sim in Android