React-native: Keystore file '/Project-Folder/android/app/debug.keystore' not found for signing config 'debug' in react-native 0.60

Created on 13 Jul 2019  ·  30Comments  ·  Source: facebook/react-native

I created a sample application with react-native version 0.60. I am trying to run application in android. But i am getting this error Keystore file '/Project-Folder/android/app/debug.keystore' not found for signing config 'debug'. I don't know how to resolve this error. Please give any suggestions for this issue.

React Native version:

"react": "16.8.6",
"react-native": "0.60.0"

Steps To Reproduce

  1. Trying to run application in android.
  2. But getting Keystore file error in android.
Bug Android

Most helpful comment

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

All 30 comments

Which commands are you using?

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

hi @kiranjd and @cmorbitzer thank you for your response. I missed the file called debug.keystore. So i placed this debug.keystore file in my project folder it solves the error i.e., Keystore file '/Project-Folder/android/app/debug.keystore' not found for signing config 'debug'.

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

Works fine to me Thx

@bondehagen Where are we supposed to store this file in our react native project?

@priyajainSE, put debug.keystore in the android/app/ directory

Ubuntu:

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_

In folder /home/ - Ctrl + H show all file hidden

Copy file debug.keystore in /home/.android/ to android/app/ directory your project, and rebuild

您可以通过在android/app/目录中运行此命令来生成调试密钥库:keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000

对我来说工作正常Thx

thanks a lot !

@cmorbitzer @bondehagen, Resolved my issue to place _debug.keystore_ file inside _anadroid/app_ directory. Wait... _*.keystore_ extension files are ignored in Github versioning. It means whenever we clone the project then we have to generate or place _debug.keystore_ file manually?

React Native version:

"react": "16.8.6",
"react-native": "0.60.5"

@Rizwanilahi Yes I think. Personally I added !android/app/debug.keystore in the .gitignore to avoid that.

wow worked for me :)
First I added the environment variables and then I run on prompt keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 in android/app directory

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

This worked for me too :)

@cmorbitzer works like a charm thks

Or just download from official template https://raw.githubusercontent.com/facebook/react-native/master/template/android/app/debug.keystore

Saving lives huh? Thanx

I followed the instructions above and got this error

java.lang.RuntimeException: com.android.ide.common.signing.KeytoolException: Failed to read key androiddebugkey from store "/Users/kirstysimmonds/com.piavita-vet.android-copy/android/app/debug.keystore": Invalid keystore format

Does anyone know what I should do, please?

Or just download from official template https://raw.githubusercontent.com/facebook/react-native/master/template/android/app/debug.keystore

Saving lives huh? Thanx

Thank you very much! this save time

For me solved too.
keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000

for everyone like me who is super lazy:

curl https://raw.githubusercontent.com/facebook/react-native/master/template/android/app/debug.keystore > android/app/debug.keystore

run ☝️ in your project root directory (same as where your package.json is) and then check that file into git ☺️

Or just download from official template https://raw.githubusercontent.com/facebook/react-native/master/template/android/app/debug.keystore

you save my day Hat off

Or just download from official template https://raw.githubusercontent.com/facebook/react-native/master/template/android/app/debug.keystore

Yes, also worked for me! Thanks

Hi what the default password of the debug.keystore file?

@hafiztayab I have try once and it's work for me using password android

project from github. Everything went well but when I try to compile the project, it does not work and returns this to me:
The key file "C: \ Users \ user \ .android \ debug.keystore" was not found for signing the "config" configuration.

You notice that in my case it is not a question of 'debug' but of 'config'. Any tip for me? I downloaded the debug.keystore file but nothing has changed

Or just download from official template https://raw.githubusercontent.com/facebook/react-native/master/template/android/app/debug.keystore

project from github. Everything went well but when I try to compile the project, it does not work and returns this to me:
The key file "C: \ Users \ user \ .android \ debug.keystore" was not found for signing the "config" configuration.
You notice that in my case it is not a question of 'debug' but of 'config'. Any tip for me? I downloaded the debug.keystore file but nothing has changed

Or just download from official template https://raw.githubusercontent.com/facebook/react-native/master/template/android/app/debug.keystore

project from github. Everything went well but when I try to compile the project, it does not work and returns this to me:
The key file "C: \ Users \ user \ .android \ debug.keystore" was not found for signing the "config" configuration.
You notice that in my case it is not a question of 'debug' but of 'config'. Any tip for me? I downloaded the debug.keystore file but nothing has changed

@DevEventlab please try with android Studio it will solve your problem

I have generated the debug.keystore file and placed it at /android/app, but still the command npm run android fails with the same error. I also tried to download the file from the official template, but still the same occurs. Any ideas why?

upgrade to latest version, this was solved with pull request https://github.com/facebook/react-native/pull/25807 please close this

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

This works :) Thanks.

keytool : The term 'keytool' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path
was included, verify that the path is correct and try again.
At line:1 char:1

  • keytool -genkey -v -keystore debug.keystore -storepass android -alias ...
  • ~~~

    • CategoryInfo : ObjectNotFound: (keytool:String) [], CommandNotFoundException

    • FullyQualifiedErrorId : CommandNotFoundException

I'm facing this issue. Kindly help me with this

Was this page helpful?
0 / 5 - 0 ratings

Related issues

upbit picture upbit  ·  3Comments

axelg12 picture axelg12  ·  3Comments

phongyewtong picture phongyewtong  ·  3Comments

anchetaWern picture anchetaWern  ·  3Comments

jlongster picture jlongster  ·  3Comments