How to obtain SHA1 certificate for Android studio 3.2.2? - android-studio

I have seen many videos on how to obtain SHA1 certificate for Android Studio but they were all for other versions. There is no option for generating 'signed APK' in my Android Studio. Please help. Thanks in advance.

Fastest way to get SHA1 is through Android Studio.
Open gradle window from right side.
Right click on ProjectName-> Tasks-> android-> signingReport
Choose Run (1st option).
you will get SHA1 and MD5 inside your Run window at bottom which will be automatically opened after clicking on Run (Step 3).
Here is the Snapshot:-

Getting your SHA1 key is a little more complicated on a Windows system so, follow along with my steps here:
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).
You should then be prompted with the password as normal which you can enter (The password is android) . After that, you’ll see the list of certificates printed to the screen. You want the SHA1 key.
In Command Prompt, it’s a little more tricky to copy the result so, to do that, follow these instructions:
1) Right-click on the Command Prompt.
2) Select Mark.
3) Highlight the SHA1 key.
4) Right-click again and the text will then be copied to your clipboard. You can now enter this on the Google Developer’s Console.

Related

keytool is missing from its jre/bin folder

I would like to use keytool.
As usually - as far as I know - its default install place with Android Studio is the following:
C:\Program Files\Android\Android Studio\jre\bin
Well, my folder is empty as you can see:
I have reinstalled Android Studio twice and this folder still contains nothing.
Any insights?
EDIT:
I've installed it for the third time, and now there is not even a "jre" folder inside the "Android Studio" folder:
I struggled with the exact same thing for days with no answers or no one else posting that they had the same struggle
My keytool was in the jbr/bin folder.
Call to that folderpath when using keytool in the cmd prompt (ala this page How can I find and run the keytool) -but in your case it should be something like:
C:\Users[name]>C:\Program Files\Android\Android Studio\jbr\bin\keytool.exe" -genkey .....
also; adding the path in the system environment variable did nothing for me, i had to manually type in the path in the prompt as you can see.

how to move workspace(a simple project) from windows file system (/mnt/) to linux (~/home)

I am developing a Django project (nothing) and trying to use using WSL2.
so if I use the Ubuntu Terminal from Windows to create a project and try running it in VScode, I got this little message,
I just don't know how to do that at all,
it's the first time I tried to use WSL2 (which is awesome), if someone could help, thank you very much.
If you have your project in some mounted folder -> linux path starting with /mnt/ e.g.
/mnt/c/Users/rasto/Desktop/some_folder/my_project/
When you open VS Code in this directory (via running command code . or opening the VS Code from windows) you get the warning:
This workspace is on the Windows file system (/mnt/). For best performance, we recommend moving the workspace to the Linux file system (~/home).
The solution is easy -> move/copy the project folder to ~/my_project/ directory:
In WSL terminal:
Recursively copy all files from source-path to destination-path and if the folder ~/my_project/ does not exists, it will be created
cp -R /mnt/c/Users/rasto/Desktop/some_folder/my_project/ ~/my_project
Move to the directory in your terminal
cd ~/my_project
And open VS Code from console with
code .
Note: To open VS Code from terminal you must have installe extension Remote Development extension pack
Note2: To access the linux folder from windows file explorer just right click in VS Code explorer and Reveal in explorer or with the path like: \\wsl$\Ubuntu-18.04\home\rasto\my_projects

When trying to export libgdx desktop using command on android studio, the command is not recognized

So I went onto the internet to find out how to export my libgdx project from android studio, and I learned that you can generate it by using the command gradlew desktop:dist. But when I type this into the terminal window in android studio, it says, 'gradlew' is not recognized as an internal or external command, operable program or batch file. Why is this happening?
This is happening because the terminal can't find the gradlew program. If you're using Linux, make sure to type ./gradlew- but my guess is that you're using windows.
First, use your file browser to navigate to your project directory and make sure that gradlew.bat is present. If it isn't, you don't have gradlew as part of your project and need to go get it from The Gradle Website.
If you have gradlew.bat, make sure that your terminal is navigated to your project directory. On windows you can see where it is currently pointed using echo %cd% - if it doesn't show your current directory, you need to use the cd command to navigate to your project directory.
You can also confirm you're in the right place by running dir in the terminal- you should see gradlew.bat.

Installing Emacs Emulation keybindings -- Invalid VSIX package

I'm trying to install the extension for Visual Studio 2012 that allows emacs key-bindings.
I'm following through the steps here:
Emacs Keybindings in Visual Studio 2012 or 2013
I'm up to step 5:
Run the vsik file as administrator. This is required so the extension
can write Emacs.vsk into the program files folder. I wasn't sure the
best way to do this so I ran a command prompt as admin and then
executed start emacsemulations.vsik from the prompt.
So, running emacsemulations.vsix from an administrator command prompt,
I get the following error "This VSIX package is invalid because it does not contain the file extension.vsixmanifest at the root."
I'm not changing any of the file names inside the package.
I'm thinking this may have something to do with how windows zips up the file -- I'm able to recreate the problem simply by unzipping and rezipping the EmacsEmulation.vsix file without changing the contents of the vsix package.
If anyone has any suggestions on how to fix, or even better, the actual updated vsix file itself, I'd be very grateful!
The issue you have relies on the way you are zipping your file, what you should do is zip all files inside the folder you created (in this case, "EmacsEmulations") when you unzipped it.
Step into the EmacsEmulations folder.
Select all files.
Add to .zip
Rename the .zip output to EmacsEmulations.vsix
I'm trying to get this extension to work too, so good luck!

Where's the "TEMP" folder for Custom Build Steps?

Visual Studio 2010, in my project I made a custom build step which renames a dll file and copies it to other folder. So, Alt+F7, Config props, Custom Build Step / General, command line:
copy /y $(TargetPath) $(TargetName).node
It didn't do anything. Then I also added
ping bat.femei.ro -n 1 -w 5000
It still didn't do anything. It simply flashed a command prompt window for a split second then the window went away. I googled as much as I could concluding that there might be a problem with the folder where the batch file is generated.
I did my best to screenshot that split second with the command prompt and after a boring F7-PrintScreen-PasteInPaint session finally I got
C:\Users\FURAT\AppData\Local\Temp\blablablablablablablablabla.exec.cmd is not recognized as internal or external...
I double checked the directory. It has Everyone permissions set to Allow both Read & Write operations. What's wrong? How do I fix this?
I was unable to find any knobs to tweak temp folder path. It's not Env and it's not in the config either.
What did work however was running VS2010 as Administrator. Now the Custom Build Step works.

Resources