React Native MacOS facing jettifier issue
Facing jettifier issue while running the react native app hope this helps!!
Error :
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
error Failed to run jetifier. Run CLI with --verbose flag for more details.
Solution :
(i) Enter the command below outside the project of your main folder which has your app created inside it, in order to have the latest cli from the community which has fixed the jettifier issue
npm install -g react-native-cli react-native
npx react-native-community/cli
(ii) Enter the below command in your terminal
cd android
and then
./gradlew clean
(iii) If the build is successful then enter your project from terminal by entering the below command
cd YOUR_REACT_NATIVE_PROJECT_PATH
Check if the gradle.properties include the below lines if not please include it
android.useAndroidX=true
android.enableJetifier=true
(iv) You are all set to run your app with the below command
npx react-native run-android
If you are still facing any issue
Make sure your app is AndroidX
npm install --save-dev jetifier
npx jetify
npx react-native run-android
Else create a new project under the same folder where you did install npx react-native-community/cli and run the app.
If you are facing any other issue other than jettifier have a look at
npx react-native run-android Failing in macOS
0 Comments