Java lang exception keystore file does not exist debug keystore

Keystore file does not exist

After checking this make sure to change your configuration module to your current project. To do this follow the below steps:

1)Click on the’select Run/Debug configuration’ drop-down

2) Select app

3)Click on the’select Run/Debug configuration’ drop-down again and select edit configurations

4)Select the ‘General’ tab and change the ‘Module’ to ‘app’, also tick the ‘activate tool window’ checkbox

now you can run your project like before by pressing on the run button.

Solution 2

The debug keystore file isn’t in your application’s directory, it’s in your .android directory. If you’re using Windows, it’s probably in C:\Users\yourname\.android (where instead of «yourname» use your own User directory).

Читайте также:  Caused by java io ioexception cannot run program node

Once you know where it is, you can run the keytool like this:

 keytool -list -v -keystore "C:\Users\yourname\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android 

Solution 3

enter image description here

To find SHA-1 of your application, you can find like: To click on right side of your android studio click on gradle and then click on task-> android-> signingreport you will find your application sha-1 on below console.

and to generate signing keystroke file you have to generate signing buid apk, to genrate signing build apk click on Build->generate signing apk->creaenew then follow the provedure you will find your keystroke file on your desire location.thanks

Solution 4

Important: Keep in mind debug.keystore won’t be generated if you haven’t run any app in you android studio. Ie: debug.keystore is generated after the first run of the app on Android Studio.

But you can also generate Release/Debug Keystores for signing Android apps at the command line.

  1. A debug keystore which is used to sign an Android app during development needs a specific alias and password combination as dictated by Google. To create a debug keystore, use:
 $ keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 
  • Keystore name: «debug.keystore»
  • Keystore password: «android»
  • Key alias: «androiddebugkey»
  • Key password: «android»
  • CN: «CN=Android Debug,O=Android,C=US»

Then inorder to access the Key Fingerprints:

  1. Open C drive and follow this path C:\Program Files\Java\jdk1.8.0_201\bin
  2. Then with bin folder open cmd
  3. Now execute
$ keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore -list -v 

For further clarification refer :

Solution 5

I found this from teamtreehouse forum. It solve my problem. try to follow these steps.

1) Open Command Prompt by pressing Start+R and typing cmd.exe.

2) Using Windows Explorer, find where your JDK directory is located (Usually Program Files >> Java) and copy the path.

3) In Command Prompt, type cd followed by the directory of your JDK’s bin directory. e.g: cd C:\Program Files\Java\jdk1.8.0_25\bin is the command I use (Yours may vary).

4) Using Windows Explorer, find where your .android directory is located (Usually under Users >> [YOUR WINDOWS USERNAME] ) and copy the path.

5) Now, use this command below:

keytool -exportcert -alias androiddebugkey -keystore[PATH_TO_.ANDROID_DIRECTORY] -list -v 

Replacing [PATH_TO_.ANDROID_DIRECTORY] with the path you copied. Note that you should be running this command in terminal/command prompt in your JDK’s bin directory (You did this in Step 3).

Mine is C:\Program Files\Java\jdk1.8.0_121\bin>keytool -exportcert -alias androiddebugkey -keystore C:\Users\HoSiLuan\.android\debug.keystore -list -v

Remember to use C:\Users\HoSiLuan\.android\debug.keystore instead of ~/.android\debug.keystore . I still got the error when type this shorten way.

Then enter password, normally it’s android . After that, you’ll see the list of certificates printed to the screen.

Источник

‘keytool’ is not recognized as an internal or external command: How to fix this on Windows and macOS

Keytool is a free command line tool that is added to your system when you install Java.

If you want to build an Android APK binary that can be distributed on the Play Store, you need to use keytool to generate the SHA-1 fingerprint for your signing certificate.

This is a required step when configuring the Firebase SDK for your Android (or Flutter) app.

This page on the official documentation explains how to use keytool, but not how to install it.

So if you got stuck with this before, this article explains all the required steps.

Build and grow in-app purchases.

Code with Andrea is free for everyone. Help me keep it that way by checking out this sponsor:

Build and grow in-app purchases. Glassfy’s Flutter SDK solves all the complexities and edge cases of in-app purchases and subscriptions so you don’t have to. Test and build for free today by clicking here.

Getting the SHA-1 certificate fingerprint with keytool

This is how to use keytool to get the debug SHA-1 certificate fingerprint on Windows:

 
keytool -list -v -alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore

And this is the equivalent on macOS/Linux:

 
keytool -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore

However, the commands above will only work if you have keytool already installed on your system, and it is included in your system PATH.

‘keytool’ is not recognized as an internal or external command, operable program or batch file.

If this is not the case, you’ll be greeted with this message (on Windows):

Install keytool on your system

Keytool is included as part of the Java runtime. So by installing Java, you’ll also have keytool in your system.

To install Java, visit the JAVA SE Downloads page.

This takes you to a page called «Java SE Development Kit 15 Downloads».

Scroll to the bottom, and you’ll find download links for Linux, macOS and Windows.

Java SE Download links

Download the correct installer ( jdk-15.0.1_windows-x64_bin.exe on Windows, jdk-15.0.1_osx-x64_bin.dmg on macOS). Then follow the installation steps for your system and make a note of where this is installed (e.g. C:\Program Files\Java\jdk-15.0.1\ on Windows).

Congratulations, the Java SDK is now installed on your system.

Add the keytool folder to your system PATH (on Windows)

In order to run keytool from the command line, you need to add it to your system PATH.

This step is required on Windows only, as keytool will is automatically installed on /usr/bin on macOS/Linux.

On the search box, type path , then open Edit the system environment variables (Control panel):

This opens the Advanced tab of the System Properties dialog:

From here, select Environment Variables. , which opens this dialog:

You’ll see that both the User variables and System variables have a Path variable. It doesn’t really matter which one you choose. For this example, we’ll edit the User variables one.

The next dialog shows the environment variables for the current user. Select New, then add a new line pointing to your jdk installation folder, with a trailing \bin at the end (e.g. C:\Program Files\Java\jdk-15.0.1\bin ):

Then press OK and close all the dialogs, then open a new command prompt.

Try running keytool . This time you should get this output:

 
C:\Users\salta>keytool Key and Certificate Management Tool Commands: -certreq Generates a certificate request -changealias Changes an entry's alias -delete Deletes an entry -exportcert Exports certificate -genkeypair Generates a key pair -genseckey Generates a secret key -gencert Generates certificate from a certificate request -importcert Imports a certificate or a certificate chain -importpass Imports a password -importkeystore Imports one or all entries from another keystore -keypasswd Changes the key password of an entry -list Lists entries in a keystore -printcert Prints the content of a certificate -printcertreq Prints the content of a certificate request -printcrl Prints the content of a CRL file -storepasswd Changes the store password of a keystore -showinfo Displays security-related information Use "keytool -?, -h, or --help" for this help message Use "keytool -command_name --help" for usage of command_name. Use the -conf url> option to specify a pre-configured options file.

This confirms that keytool is installed and configured in your PATH.

Using keytool to generate te SHA-1

You’re now ready to generate your SHA-1:

 
keytool -list -v -alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore

This will work, if you already have a keystore at the given location ( %USERPROFILE%\.android\debug.keystore ). If not you’ll get this error:

 
keytool error: java.lang.Exception: Keystore file does not exist: C:\Users\salta\.android\debug.keystore java.lang.Exception: Keystore file does not exist: C:\Users\salta\.android\debug.keystore at java.base/sun.security.tools.keytool.Main.doCommands(Main.java:916) at java.base/sun.security.tools.keytool.Main.run(Main.java:422) at java.base/sun.security.tools.keytool.Main.main(Main.java:415)

If you don’t have a keystore, you’ll need to generate one with Android Studio. This document about app signing on Android includes the information you need.

Conclusion

Phew! Getting keytool running on Windows requires a few steps, but we got there in the end.

If I have missed something, let me know on Twitter.

Never miss my articles & tutorials

Join 17K+ Flutter developers who get 2+ high-quality articles every month. Published on Fridays.

No spam, ever. Unsubscribe at any time.

Never miss my articles & tutorials

Join 17K+ Flutter developers who get 2+ high-quality articles every month:

Want More?

Invest in yourself with my high-quality Flutter courses.

Flutter Foundations Course

Flutter Foundations Course

Learn about State Management, App Architecture, Navigation, Testing, and much more by building a Flutter eCommerce app on iOS, Android, and web.

Flutter & Firebase Masterclass

Flutter & Firebase Masterclass

Learn about Firebase Auth, Cloud Firestore, Cloud Functions, Stripe payments, and much more by building a full-stack eCommerce app with Flutter & Firebase.

The Complete Dart Developer Guide

The Complete Dart Developer Guide

Learn Dart Programming in depth. Includes: basic to advanced topics, exercises, and projects. Fully updated to Dart 2.15.

Flutter Animations Masterclass

Flutter Animations Masterclass

Master Flutter animations and build a completely custom habit tracking application.

Grow as a Flutter Developer

Join 17K+ Flutter developers who get 2+ high-quality articles every month. Published on Fridays.

No spam, ever. Unsubscribe at any time.

Copyright © 2023 Coding With Flutter Limited

Источник

StackoverflowTips

Explore the dynamic world of AI and its applications through our blog. Discover trending topics like machine learning, computer vision, AI in healthcare and finance, NLP, robotics, and more. Stay informed about the latest AI advancements and ethical considerations.

Search This Blog

Keystore file does not exist

The following steps are required to solve this problem.

Error: keytool error: java.lang.Exception: Keystore file does not exist: path-to-debug-or-production-keystore

  • open command-line tool — WINDOW+R
  • go to C:\Program Files\Java\jdk1.8.0_261 (or your java version)

keytool -exportcert -alias androiddebugkey -keystore C:\Users\your.username>\.android\debug.keystore -list -v

Note* to use C:\Users\ \.android\debug.keystore instead of ~/.android\debug.keystore. I still got the error when type this shorten way.

  • Get link
  • Facebook
  • Twitter
  • Pinterest
  • Email
  • Other Apps
  • Get link
  • Facebook
  • Twitter
  • Pinterest
  • Email
  • Other Apps

Comments

Post a Comment

azure function error unknown argument —port

How to run Azure Function app on a different port in Visual Studio or azure function error unknown argument —port How to Fix it? Update Project Properties -> Debug to following put the following command «host start —port 7071 —pause-on-error» Finally, it works

  • Get link
  • Facebook
  • Twitter
  • Pinterest
  • Email
  • Other Apps

Microsoft Graph API upload large file to SharePoint

How to Upload a file to SharePoint using Microsoft Graph API — C#/.Net? To make it easier to upload large files, a number of entities in Microsoft Graph support plus some extra file uploads. Instead of attempting to upload the entire file in a single request, the file is divided into smaller pieces and a single request is used to upload a single slice. To make this process easier, the Microsoft Graph SDKs include a large file upload task that handles the uploading of the slices. Azur AD Setup: you need to complete the following steps to configure the azure ad. Step — 1: Register an application with the Microsoft identity platform Sign in to the Azure portal . If you have access to multiple tenants, use the Directories + subscriptions filter in the top menu to switch to the tenant in which you want to register the application. Search for and select Azure Active Directory . Under Manage , select App registrations > New registration . Enter a Display Name for your applicatio

  • Get link
  • Facebook
  • Twitter
  • Pinterest
  • Email
  • Other Apps

Источник

Оцените статью