Category Archives: React Native

React Native Publishing an Android App

How to fix com.myapp.MainApplication cannot be cast to com.facebook.react.ReactApplication

To fix this issue, thats happening when using react-native-push-notification package with Expokit, you will need to go into your android/src/main/java/host/exp/exponent and open up the file. The file needs to be edited and changed, so you avoid any errors with getting push notifications. A sample file looks like this: package host.exp.exponent; import com.facebook.react.ReactPackage; import java.util.Arrays; […]

React Native Publishing an Android App

Dismiss keyboard in multiline TextInput in React native

By doing below code , you keyboard show return key you wanted for example “done”, “go” and also dismiss the keyboard when you press return key in my case done key while using multi line seamlessly. import {Textinput, ScrollView, Keyboard} from ‘react-native’; // …code <TextInput keyboardType=”default” returnKeyType=”done” multiline={true} blurOnSubmit={true} onSubmitEditing={()=>{Keyboard.dismiss()}} />

React Native Publishing an Android App

Fix package does not exist

Here is how to automatically fix all android to androidx issues for React Native. 1. Please check that you have NPX installed and if not, install it with: npm install -g npx 2. Add the following two flags to true in your file at ProjectFolder/android/ android.useAndroidX=true android.enableJetifier=true 3. Execute these lines: npm install –save-dev […]