Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Xamarin.Android.Build.Tasks] NullReferenceException in Xamarin.Andro…
…id.Common.targets (#6126) Fixes: #6124 Commit 2a04748 removed the `[Required]` attribute from the `AndroidApkSigner.KeyPass` and `AndroidApkSigner.StorePass` properties. This was because they were now optional. However `keytool` REQUIRES these parameters when we use the `-ks` or `KeyStore` argument. If a user does not pass these arguments they get the following error error XAAAS7001: System.NullReferenceException: Object reference not set to an instance of an object. error XAAAS7001: at Xamarin.Android.Tasks.AndroidApkSigner.AddStorePass(CommandLineBuilder cmd, String cmdLineSwitch, String value) error XAAAS7001: at Xamarin.Android.Tasks.AndroidApkSigner.GenerateCommandLineCommands() This is because the `KeyPass` or `StorePass` are `null` and the `AndroidApkSigner.AddStorePass()` method did not handle that. Instead, when the `KeyStore` argument is being used we should error out if `KeyPass` or `StorePass` are empty or `null`, emitting a new `XA4314` error, e.g.: error XA4314: `$(AndroidSigningKeyPass)` is empty. A value for `$(AndroidSigningKeyPass)` should be provided.
- Loading branch information
1 parent
810c917
commit 27e91bb
Showing
17 changed files
with
114 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
title: Xamarin.Android error XA4314 | ||
description: XA4314 error code | ||
ms.date: 26/07/2021 | ||
--- | ||
# Xamarin.Android warning XA4314 | ||
|
||
## Example messages | ||
|
||
``` | ||
error XA4314: `$(Property)` is empty. A value for `$(Property)` should be provided. | ||
``` | ||
|
||
## Issue | ||
|
||
The specified `$(Property)` does not have a value which is required. | ||
|
||
## Solution | ||
|
||
Check that the `$(Property)` MSBuild property is set to a valid value. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters