android studio, debug.keystore missing - android

After building my project on Android Studio 1.2 on Ubuntu 14.04 I can't get any debug.keystore on the ./android folder which I need for the google maps API. I tried it again and again but could not get it. Can somebody help me?

According to documentation..
debug keystore resides in path : $HOME/.android/debug.keystore
and if it is not there, it will generate it automatically (After you test your application in debug mode)
read this from android developer documentation.
Alternatively, you can generate a keystore without Eclipse with the following JDK command from wither a Windows command prompt or Cygwin with this command:
keytool -genkeypair -alias androiddebugkey -keypass android -keystore debug.keystore -storepass android -dname "CN=Android Debug,O=Android,C=US" -validity 9999
Keytool is a part of the JDK and needs to be in the system PATH to be used in this way. The path should be something like: C:\\bin
Once generated, be sure to copy the keystore file into the proper location. If you ran the command from your Cygwin home directory (the directory cygwin starts in), you will find the debug.keystore file here: C:\\home\\

A more practical answer can be found at Missing debug.keystore
Even though the answer on the following link was answered from a windows perspective I still believe it will help you solve your problem.

Related

In Expo when I build Android (The `keytool` utility was not found)

I am writing project in React Native with Expo.
Tried to Build it.
when I type command expo build:android
I choose apk type
then it asks me if you want to have us generate keystore one for you?
I chose auto generate and this happens
I have Java SDK installed even double checked keytool.exe is there. I can generate manually.
but how can I solve this?
P.S Already did in Environment variable I wrote java path in PATH variable.
Ensure jre is installed.
cd /path/to/jre/bin/folder
As keytool file is present in the bin folder of jre, give path till bin as in the command above.
Then you can do:
keytool -genkey -alias aliaskeyname -keyalg RSA -keystore C:\mykeystore
The additional option -keystore will help you to specify the path where you want the generated self signed certificate.

Not able to run android apk file on emulator/device using calabash android setup

I am attempting calabash-android run file.apk.
I get the following output error msg
Could not list certificates in keystore. Probably because the password
was incorrect. (RuntimeError)
I also tried running this command
calabash-android resign file.apk
then also receiving same error.
I have also set proper path of android-home and java-home in the environment variable and have added to the path
Any assistance in solving the problem would be greatly appreciated.
Thanks in advance.
There are two scenarios where I have encountered this to happen:
I found out that if the .android folder in your home directory might not have the file debug_keystore. If it does not have this file, go to your .android directory through terminal and then type out:
keytool -genkey -v -keystore debug.keystore -alias androiddebugkey -storepass android -keypass android -keyalg RSA -keysize 2048 -validity 10000
If you have extracted the test folder from a repository and the original uploader used a different gem version to generate the project structure, then you could see this. Solution would be to simply generate a new project structure and then include the tests in your structure.
Not that I would ever do this but let's say you have a friend. And let's say this friend tried to troubleshoot without a clear direction and ran:
$ calabash-android setup
And imagine this friend took some crazy liberties with filling out the prompts and didn't realize his failed troubleshooting left a calabash_settings file in the root of his project directory. If he were to remove this file and follow Sunil's advice, everything might turn out okay for him.

not able to locate keytool on my mac to sign my apk file

I've used phonegap Build to create my .apk file and i'm trying to sign it.
I understand that I can do this with the following command:
$ keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -validity 10000
But when I run this in terminal I get 'command not found' ?
I'm running this on a mac so from what I've read I have the required JDK installed ( I have xcode ) I guess it might be that the PATH is not set correctly to keytool, but I'm unable to find any simple info on resetting this.
Any help would be hugely appreciated. I must be missing something very simple as it can not be this difficult to sign the app ?!?!
This was a nightmare for me, such a seemingly simple task took far too long.
to locate Keytool on a mac
first type this into command prompt:
/usr/libexec/java_home -v 1.7
it will spit out something like:
/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home
keytool is located in the same directory as javac. ie:
/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/bin
From bin directory you can use the keytool.
I usually use the APK tools in Eclipse to sign keys but I generated the fingerprint in past and didn't record it. I need keytool to tell me that value...
Hopefully that helps someone else
Just a note i had to add './' in front within the keytool location.
Keytool Location
/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/keytool
Command run
./keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key
Hope that helps someone.
Make sure you have cd'd into the android-sdk/platform-tools directory (where the keytool will [most likely] reside). The command won't be found if you aren't in the keytool-containing directory.
keytool comes with the Java Development Kit (JDK). So look for the directory that contains javac, java and you will find keytool present over there. You can run it directly from that directory or set the PATH.
I had this same error when running on Mac.
Removing the '$' worked for me, and was then prompted to enter the details to create the keystore.
I then had trouble finding the keystore, as I thought it would be within .android under my user account, but it was actually saved straight to my user account [cd users/YourUserName]
Hope that helps anyone with the same issue
New location for keytool if you have Android Studio installed is
/Applications/Android\ Studio.app/Contents/jre/Contents/Home/bin/

How to generate MD5 fingerprint using macbook 10.5.8 for Android?

I want to generate MD5 Fingerprint for using GoogleMap in Android. But I am using Macbook 10.5.8 and Eclipse Indigo.
Any suggestion will be appreciate...
Check out the process to generate MD5 fingerprint.
Using Google Maps in Android
Answer for my question is we can create MD5 fingerprint for MAC in a usual way i.e. by using the following command
$ keytool -list -alias androiddebugkey -keystore .keystore \
-storepass android -keypass android
One important thing about MAC is .android folder is hidden.To make that folder visible we have use command Command+Shift+G.
Problem with me is I have installed fresh eclipse and I had not run a single project so the debug.keystore file was not generated.So it is giving me an error of file not found exception.

Google maps error when trying to get my API Key for android

keytool -list -alias androiddebugkey -keystore "C:\Users\hp\.android\debug.keystore" -storepass android -keypass android
thats what i type into my command, on windows 7 and i keep getting the reply "keytool is not recognised as an internal or external command, operable program or batch file."
=S not sure weather to install andriod again or if ive miss typed something
The keytool utility is not part of the Android SDK, but the Java JDK.
It appears you may not have your JDK bin/ directory in your PATH. While in a command-prompt, try browsing to the directory C:\Program Files (x86)\Java\jdk#\bin (# is your jdk version installed) then running the command.
Note: If you are using jdk 1.7.0 you may need to add the -v option to keytool as it doesn't give MD5 by default, only SHA.

Categories

Resources