react-native

React Native Task :app:validateSigningDebug FAILED


I am completely new to react-native and android. I have downloaded a project from Github and used commands yarn install and react-native run-android to run the project. but getting this error. Can't seem to understand the reason. What should I do?

info Starting JS server...
info Installing the app...
> Task :app:validateSigningDebug FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings
17 actionable tasks: 17 executed

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:validateSigningDebug'.
> Keystore file '/home/tawsif/react native/react-native-redux/android/app/debug.keystore' not found for signing config 'debug'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 4s

Solution

  • The problem is that the build is looking for the debug keystore and cannot find it.

    Keystore file /home/tawsif/react native/react-native-redux/android/app/debug.keystore not found for signing config 'debug'.

    There's an issue with the same problem in React Native GitHub. According to the page, you can solve it by creating a debug keystore. Quote from the thread:

    You can generate the debug keystore by running this command in the android/app/ directory: keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000

    Link to the issue: https://github.com/facebook/react-native/issues/25629