0

What is -r in the command line of npx jetify -r

I need to know the npx jetify -r what does it do?

I have set a script in package.json as

postinstall: npx jetify -r

Note: I am using the latest react-native (0.63)

But it have passed in all local builds. But it get failed in the cloud build of app circle.

I need to fix the below issues

    node_modules/react-native-calendar-events/android/src/main/java/com/calendarevents/RNCalendarEvents.java:104: error: cannot find symbol
    
            int writePermission = ContextCompat.checkSelfPermission(reactContext, Manifest.permission.WRITE_CALENDAR)
node_modules/react-native-calendar-events/android/src/main/java/com/calendarevents/RNCalendarEvents.java:13: error: package android.support.v4.content does not exist

import android.support.v4.content.ContextCompat;
sejn
  • 2,040
  • 6
  • 28
  • 82

1 Answers1

1

-r is means for reverse mode

what reverse mode ?

like u must not migrate to AndroidX yet, but libraries migrated and ship using AndroidX

Edofx
  • 108
  • 1
  • 6
  • I did not get you. So I already in react-native 0.63.0. But some issues occurs, so I add npx jetify -r. So I need to run only the npx jetify not npx jetify -r. I am i correct? – sejn Mar 04 '21 at 12:34
  • @sejn are u trying to install dependencies and got a problem ? if yes, what dependencies.. because if u create RN project with npx react-native init u can check at gradle.properties. should be androidX = true. CMIIW – Edofx Mar 04 '21 at 13:11
  • So If I create a new project npx it all in android x. I not need to run npx jetify -r. I am I right? Also the gradle properties will shows AndroidX = true. – sejn Mar 04 '21 at 13:38
  • Issue fixed. After removiing -r in the latest react-native it works – sejn Mar 05 '21 at 14:18