Search code examples
react-nativereact-navigation-stackreact-navigation-drawer

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. error while installing some libraries


I am trying to create one react native app with Drawer navigation with menu in header using stack navigation like below

enter image description here

I have installed packages like below
1.npm install react-navigation
2.npm add react-native-reanimated react-native-gesture-handler react-native-screens@^1.0.0-alpha.23
3.npm add react-navigation-drawer

After that it's working as expected like below for drawer menu enter image description here then am trying to create menu in header by using stack navigation after executing npm install react-navigation-stack am getting below error while running app

enter image description here

sometimes after installing react-native-vector-icons also am getting same error, please help in this thanks in advance


Solution

  • try this;

    open your cmd, navigate to your project directory

    cd into android
    

    then run

    ./gradlew clean
    

    then re-run the app or install the package you want like the ICONS one! and try

    npx react-native run-android
    

    that should help;

    otherwise, see this link and follow steps to install multi dex and then repeat the above-said steps!

    as a Side Note: you should! update android studio, plugins and rebuild the app with latest android and Gradle