Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Key Signing Frustration

GregKujawaGregKujawa USMember ✭✭

So my admin workstation died, and I reinstalled Visual Studio 2015 Pro with Xamarin. Updated to the latest releases. I have a project that was building, deploying, and debugging just fine on my former workstation. On my new workstation the project builds, but I cannot deploy it or debug to any AVD emulator.

First of all, my VS 2015 and Xamarin install didn't create any **c:\users{my_user}\appData\Local\Xamarin\Mono for Android **directory. So the self-signed default keystore mechanism wouldn't work. So I manually invoked the keytool.exe command to create a new key in this same directory I created. And I specified this in my Android build options. Still failed. I'll paste the Build output below. And if I uncheck this Android build option and leave the default (which points to the same debug.keystore file), things fails due to the keystore being seen as tampered with.

Any suggestions on getting this to work? I really need to be able to cleanly debug and deploy this project for production purposes. So far I've spun my wheels :(

2>Starting deploy AVD_GalaxyNexus_ToolsForApacheCordova ...
2>Deploying AVD_GalaxyNexus_ToolsForApacheCordova ...
2>Build started.
2>Project "DchStocktake.csproj" (Install target(s)):
2>Deleting file "bin\Debug\DchStocktake.DchStocktake.apk".
2>Copying file from "C:\Users\gkujawa\Documents\diamondcellar-projects\DchStocktake\DchStocktake\obj\Debug\android\bin\DchStocktake.DchStocktake.apk" to "bin\Debug\DchStocktake.DchStocktake.apk".
2>Deleting file "obj\Debug\android_debug_keystore.flag".
2>Deleting file "bin\Debug\DchStocktake.DchStocktake-Signed.apk".
2>C:\Program Files (x86)\Android\android-sdk\build-tools\29.0.2\zipalign.exe 4 "C:\Users\gkujawa\Documents\diamondcellar-projects\DchStocktake\DchStocktake\obj\Debug\android\bin\DchStocktake.DchStocktake.apk" "bin\Debug\DchStocktake.DchStocktake-Signed.apk"
2>The "AndroidApkSigner" task was not given a value for the required parameter "KeyAlias".
2>Done building project "DchStocktake.csproj" -- FAILED.
2>Build FAILED.
2>Build started.
2>Project "DchStocktake.csproj" (Install target(s)):
2>Deleting file "bin\Debug\DchStocktake.DchStocktake.apk".
2>Copying file from "C:\Users\gkujawa\Documents\diamondcellar-projects\DchStocktake\DchStocktake\obj\Debug\android\bin\DchStocktake.DchStocktake.apk" to "bin\Debug\DchStocktake.DchStocktake.apk".
2>Deleting file "obj\Debug\android_debug_keystore.flag".
2>Deleting file "bin\Debug\DchStocktake.DchStocktake-Signed.apk".
2>C:\Program Files (x86)\Android\android-sdk\build-tools\29.0.2\zipalign.exe 4 "C:\Users\gkujawa\Documents\diamondcellar-projects\DchStocktake\DchStocktake\obj\Debug\android\bin\DchStocktake.DchStocktake.apk" "bin\Debug\DchStocktake.DchStocktake-Signed.apk"
2>The "AndroidApkSigner" task was not given a value for the required parameter "KeyAlias".
2>Done building project "DchStocktake.csproj" -- FAILED.
2>Build FAILED.
2>
2>Deploy failed on AVD_GalaxyNexus_ToolsForApacheCordova

Best Answer

  • GregKujawaGregKujawa USMember ✭✭
    Accepted Answer

    I resolved this. Was able pull a debug.keystore file from another admin laptop, so now the project debugs and deploys to an AVD. Using the default, self-signed file. Not sure why the VS2015 and Xamarin install didn't create this, but I'm set now.

Answers

  • GregKujawaGregKujawa USMember ✭✭
    Accepted Answer

    I resolved this. Was able pull a debug.keystore file from another admin laptop, so now the project debugs and deploys to an AVD. Using the default, self-signed file. Not sure why the VS2015 and Xamarin install didn't create this, but I'm set now.

Sign In or Register to comment.