I am trying to find SHA-1 of a Xamarin.android app to develop an app with visual studio and firebase on windows 7, I followed Microsoft documentations https://learn.microsoft.com/en-us/xamarin/android/deploy-test/signing/keystore-signature?tabs=windows but it gives me an error : "keystore file does not exist" Please how can i fix this.
Have just encountered this problem. In my case it was with an existing Xamarin Android project on a new machine, new VS2019 install.
The solution:
Create a new Android project, and deploy it to the emulator. This process seemingly creates the keystore.
I just used the template Single View App. Create the new project, select emulator, deploy. It fires up and ... does nothing.
I was then able to return to my real app, and deploy as required.
We're now using Rider and it seems that there's yet another location:
~/Library/Application Support/Xamarin/Mono for Android/debug.keystore
On my machine (which has Android Studio, Visual Studio for Mac and Rider) I have three different Android debug keystores:
~/Library/Application Support/Xamarin/Mono for Android/debug.keystore
~/.local/share/Xamarin/Mono for Android/debug.keystore
~/.android/debug.keystore
maybe you/it changed during install so the path is diffrent?
try browsing your appdata/local folder and see if you can find the xamarin mono map, and then use the whole path directly instead of %LocalAppData%
if you cant find it, or it still doesnt work, try checking the build log when you build in debug, the path for the keystore will be logged in the console during the build process.
This is what it loooks like when i build an example project, in the "deploy to device console"
Target _Sign:
/Users/theusername/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_8.0.25/bin/keytool -list -alias androiddebugkey -storepass android -keypass android -keystore "/Users/theusername/.local/share/Xamarin/Mono for Android/debug.keystore"
/Users/theusername/Desktop/AndroidSdk/build-tools/27.0.3/zipalign -p 4 "/Users/theusername/theProjectName/theProjectName/Droid/obj/Debug/android/bin/com.project.theProjectName.apk" "bin/Debug//com.project.theProjectName-Signed.apk"
/Users/theusername/Desktop/AndroidSdk/build-tools/27.0.3/zipalign -p 4 "/Users/theusername/theProjectName/theProjectName/Droid/obj/Debug/android/bin/com.project.theProjectName.apk" "bin/Debug//com.project.theProjectName-Signed.apk"
/Users/theusername/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_8.0.25/bin/java -jar /Users/theusername/Desktop/AndroidSdk/build-tools/27.0.3/lib/apksigner.jar sign --ks "/Users/theusername/.local/share/Xamarin/Mono for Android/debug.keystore" --ks-pass pass:android --ks-key-alias androiddebugkey --key-pass pass:android --min-sdk-version 18 --max-sdk-version 26 /Users/theusername/theProjectName/theProjectName/Droid/bin/Debug/com.project.theProjectName-Signed.apk
/Users/theusername/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_8.0.25/bin/java -jar /Users/theusername/Desktop/AndroidSdk/build-tools/27.0.3/lib/apksigner.jar sign --ks "/Users/theusername/.local/share/Xamarin/Mono for Android/debug.keystore" --ks-pass pass:android --ks-key-alias androiddebugkey --key-pass pass:android --min-sdk-version 18 --max-sdk-version 26 /Users/theusername/theProjectName/theProjectName/Droid/bin/Debug/com.project.theProjectName-Signed.apk
Signed android package 'bin/Debug/com.project.theProjectName-Signed.apk'
as you can see, on the two last lines in the snippet, it show me that the path for my debug.keystore is "/Users/theusername/.local/share/Xamarin/Mono for Android/debug.keystore"
I have run into the similiar problem. Please verify if the following path exist with a debug.keystore file:
/Users/theusername/.local/share/Xamarin/Mono for Android/debug.keystore
If it does not exist, create a new solution in Visual Studio and run it. This will create the keystore and you can afterwards return to your original project.
© 2022 - 2025 — McMap. All rights reserved.