There is no Xamarin debug.keystore
Asked Answered
D

4

5

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.

Danikadanila answered 11/7, 2019 at 13:14 Comment(2)
Did you build your xamarin.android app before doing the steps in the document?Quentinquercetin
Hi sorry for the late reply, no I installed visual studio and tried to get SHA-1 signature to first connect the project with firebase.Danikadanila
P
5

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.

Professional answered 25/8, 2020 at 2:42 Comment(0)
A
1

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
Aristides answered 24/1, 2024 at 2:53 Comment(0)
T
0

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"

Troche answered 11/7, 2019 at 13:33 Comment(4)
Hi, I checked and didn't find the Xamarin mono unfortunately the problem was not solved.Danikadanila
did you find the folder but it did not have the file, or did you not even find the folder?Troche
i have updated my answer with an example of my log when i build to device with debug, where i can see the path for the keystore file.Troche
sorry for the late reply , I searched everywhere but the folder Mono for Android does not existDanikadanila
D
0

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.

Dove answered 12/1, 2021 at 10:55 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.