Followers

React Native MacOS facing jettifier issue

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




Stay tuned to my posts  and do share your valuable thoughts if any queries or you would like to share anything on this topic in the comment section and please do like and share my post if this was helpful.

Hope this helped you!!


Post a Comment

0 Comments