Search code examples
androidreact-nativereact-native-cli

react-native-cli - Fails to run the android project


I'm trying to run a React Native project in my Ubuntu 16.04 PC using the react-native run-android command. However it gives me the following error.

enter image description here

The strange thing is that when I create and run an Android project using the Android Studio for the API level 23, it compiles and runs perfectly fine.

Can someone help me with this issue please?


Solution

  • Upgrading the Gradle version solved my issue. I went through the following steps.

    1. Opened the android folder inside the React Native project using Android Studio.
    2. Accepted the prompt that shows to update the version of Gradle.