"apksigner.BAT" exited with code 255.

CesarMoyaCesarMoya USMember ✭✭

Today I upgraded to the latest Xamarin and Visual Studio and started getting this error when trying to deploy my app to either an android device or an emulator:
C:\Program Files (x86)\Android\android-sdk\build-tools\27.0.0\apksigner.BAT sign --ks \mykeystore.jks --ks-pass pass:somepass --ks-key-alias "\"itscm release\"" --key-pass pass:somepass --min-sdk-version 15 --max-sdk-version 27 bin\Debug\com.test.foo.myapp.apk
The syntax of the command is incorrect.
"apksigner.BAT" exited with code 255.

Does anyone know how to fix it?

Thanks!

Tagged:

Best Answer

  • CesarMoyaCesarMoya US ✭✭
    Accepted Answer

    I found the solution, the command had a syntax error that apparently only matters on later versions on Visual Studio / Xamarin. Just remove the extra double quotes on the alias \". like so:

    C:\Program Files (x86)\Android\android-sdk\build-tools\27.0.0\apksigner.BAT sign --ks \mykeystore.jks --ks-pass pass:somepass --ks-key-alias "itscm release" --key-pass pass:somepass --min-sdk-version 15 --max-sdk-version 27 bin\Debug\com.test.foo.myapp.apk

Answers

  • CesarMoyaCesarMoya USMember ✭✭
    Accepted Answer

    I found the solution, the command had a syntax error that apparently only matters on later versions on Visual Studio / Xamarin. Just remove the extra double quotes on the alias \". like so:

    C:\Program Files (x86)\Android\android-sdk\build-tools\27.0.0\apksigner.BAT sign --ks \mykeystore.jks --ks-pass pass:somepass --ks-key-alias "itscm release" --key-pass pass:somepass --min-sdk-version 15 --max-sdk-version 27 bin\Debug\com.test.foo.myapp.apk

Sign In or Register to comment.