Skip to content

Commit cfceb52

Browse files
committed
Error documentation.
1 parent dd1df11 commit cfceb52

File tree

19 files changed

+398
-43
lines changed

19 files changed

+398
-43
lines changed

Documentation/guides/JavaDependencyVerification.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,10 @@ Additionally, a POM file can "import" dependency information from another POM fi
9090
</dependencyManagement>
9191
```
9292

93-
Dependency information cannot be accurately determined without also having access to these additional POM files, and will results in errors like:
93+
Dependency information cannot be accurately determined without also having access to these additional POM files, and will results in an error like:
9494

9595
```
9696
error : Unable to resolve POM for artifact 'com.squareup.okio:okio-parent:1.17.4'.
97-
error : Could not verify Java dependencies for artifact 'com.squareup.okio:okio:1.17.4' due to missing POM files. See other error(s) for details.
9897
```
9998

10099
In this case, we need to provide the POM file for `com.squareup.okio:okio-parent:1.17.4`:
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: .NET Android error XA4234
3+
description: XA4234 error code
4+
ms.date: 02/26/2024
5+
---
6+
# .NET Android error XA4234
7+
8+
## Example message
9+
10+
```
11+
error XA4234: '<AndroidMavenLibrary>' item 'com.example:mylib' is missing required attribute 'Version'.
12+
```
13+
14+
## Issue
15+
16+
The specified MSBuild XML item requires the specified XML attribute.
17+
18+
For example the following item is missing the required 'Version' attribute:
19+
20+
```xml
21+
<ItemGroup>
22+
<AndroidMavenLibrary Include="com.example:mylib" />
23+
</ItemGroup>
24+
```
25+
26+
## Solution
27+
28+
To resolve this error, ensure that the specified XML contains the specified attribute:
29+
30+
```xml
31+
<ItemGroup>
32+
<AndroidMavenLibrary Include="com.example:mylib" Version="1.0.0" />
33+
</ItemGroup>
34+
```
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: .NET Android error XA4235
3+
description: XA4235 error code
4+
ms.date: 02/26/2024
5+
---
6+
# .NET Android error XA4235
7+
8+
## Example message
9+
10+
```
11+
error XA4235: Maven artifact specification 'com.example' is invalid. The correct format is 'group_id:artifact_id'.
12+
```
13+
14+
## Issue
15+
16+
The specified Maven artifact specification is invalid.
17+
18+
For example the following item uses a comma separator instead of a colon:
19+
20+
```xml
21+
<ItemGroup>
22+
<AndroidMavenLibrary Include="com.example,mylib" Version="1.0.0" />
23+
</ItemGroup>
24+
```
25+
26+
## Solution
27+
28+
To resolve this error, ensure that the artifact specification is of the form 'group_id:artifact_id':
29+
30+
```xml
31+
<ItemGroup>
32+
<AndroidMavenLibrary Include="com.example:mylib" Version="1.0.0" />
33+
</ItemGroup>
34+
```
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: .NET Android error XA4236
3+
description: XA4236 error code
4+
ms.date: 02/26/2024
5+
---
6+
# .NET Android error XA4236
7+
8+
## Example message
9+
10+
```
11+
error XA4236: Cannot download Maven artifact 'com.example:mylib'.
12+
error XA4236: - mylib-1.0.0.jar: Response status code does not indicate success: 404 (Not Found).
13+
error XA4236: - mylib-1.0.0.aar: Response status code does not indicate success: 404 (Not Found).
14+
```
15+
16+
## Issue
17+
18+
Errors were encountered while trying to download the requested Java library from Maven.
19+
20+
For example the following item doesn't actually exist on Maven Central, resulting in "Not Found":
21+
22+
```xml
23+
<ItemGroup>
24+
<AndroidMavenLibrary Include="com.example:mylib" Version="1.0.0" />
25+
</ItemGroup>
26+
```
27+
28+
## Solution
29+
30+
Resolving this error depends on the error message specified.
31+
32+
It could be things like:
33+
- Check your internet connection.
34+
- Ensure you have specified the correct group id and artifact id.
35+
- Ensure you have specified the correct Maven repository.
36+
37+
Additional documentation about configuring `<AndroidMavenLibrary>` is available [here](../AndroidMavenLibrary.md).
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: .NET Android error XA4237
3+
description: XA4237 error code
4+
ms.date: 02/26/2024
5+
---
6+
# .NET Android error XA4237
7+
8+
## Example message
9+
10+
```
11+
error XA4237: Cannot download POM file for Maven artifact 'com.example:mylib':1.0.0.
12+
error XA4237: - mylib-1.0.0.pom: Response status code does not indicate success: 404 (Not Found).
13+
```
14+
15+
## Issue
16+
17+
An error was encountered while trying to download the requested POM file from Maven.
18+
19+
## Solution
20+
21+
Resolving this error depends on the error message specified.
22+
23+
It could be things like:
24+
- Check your internet connection.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: .NET Android error XA4239
3+
description: XA4239 error code
4+
ms.date: 02/26/2024
5+
---
6+
# .NET Android error XA4239
7+
8+
## Example message
9+
10+
```
11+
error XA4239: Unknown Maven repository: 'example.com'.
12+
```
13+
14+
## Issue
15+
16+
The specified Maven repository is invalid.
17+
18+
For example the following Maven repository must be specified with `https://`:
19+
20+
```xml
21+
<ItemGroup>
22+
<AndroidMavenLibrary Include="com.example:mylib" Version="1.0.0" Repository="example.com" />
23+
</ItemGroup>
24+
```
25+
26+
## Solution
27+
28+
To resolve this error, ensure that the Maven repository follows the [documented values](../AndroidMavenLibrary.md):
29+
30+
```xml
31+
<ItemGroup>
32+
<AndroidMavenLibrary Include="com.example:mylib" Version="1.0.0" Repository="https://example.com" />
33+
</ItemGroup>
34+
```
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
title: .NET Android error XA4241
3+
description: XA4241 error code
4+
ms.date: 02/26/2024
5+
---
6+
# .NET Android error XA4241
7+
8+
## Example message
9+
10+
```
11+
error XA4241: Java dependency 'org.jetbrains.kotlin:kotlin-stdlib:1.9.0' is not satisfied.
12+
```
13+
14+
## Issue
15+
16+
The specified Java dependency could not be verified using the [Java Dependency Verification](../JavaDependencyVerification.md)
17+
feature.
18+
19+
## Solution
20+
21+
To resolve this error, follow the available options in the [Resolving Java Dependencies](../ResolvingJavaDependencies.md)
22+
documentation.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: .NET Android error XA4242
3+
description: XA4242 error code
4+
ms.date: 02/26/2024
5+
---
6+
# .NET Android error XA4242
7+
8+
## Example message
9+
10+
Java dependency '{0}' is not satisfied. Microsoft maintains the NuGet package '{1}' that could fulfill this dependency.
11+
12+
```
13+
error XA4242: Java dependency 'org.jetbrains.kotlin:kotlin-stdlib:1.9.0' is not satisfied.
14+
Microsoft maintains the NuGet package 'Xamarin.Kotlin.StdLib' that could fulfill this dependency.
15+
```
16+
17+
## Issue
18+
19+
The specified Java dependency could not be verified using the [Java Dependency Verification](../JavaDependencyVerification.md)
20+
feature.
21+
22+
## Solution
23+
24+
Add a reference to the specified NuGet package to the project.
25+
26+
Alternatively, choose one of the other available options in the [Resolving Java Dependencies](../ResolvingJavaDependencies.md)
27+
documentation.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: .NET Android error XA4243
3+
description: XA4243 error code
4+
ms.date: 02/26/2024
5+
---
6+
# .NET Android error XA4243
7+
8+
## Example message
9+
10+
```
11+
error XA4243: Attribute 'JavaVersion' is required when using 'JavaArtifact' for 'ProjectReference' item '../ReferenceProject.csproj'.
12+
```
13+
14+
## Issue
15+
16+
The referenced MSBuild item XML specifies an attribute that makes an additional attribute required.
17+
18+
For example, using the `JavaArtifact` attribute on a `<ProjectReference>` requires `JavaVersion` to also be specified.
19+
20+
Invalid:
21+
22+
```xml
23+
<ItemGroup>
24+
<ProjectReference Include="../ReferenceProject.csproj" JavaArtifact="com.example:mylib" />
25+
</ItemGroup>
26+
```
27+
28+
## Solution
29+
30+
To resolve this error, specify the required XML attribute:
31+
32+
```xml
33+
<ItemGroup>
34+
<ProjectReference Include="../ReferenceProject.csproj" JavaArtifact="com.example:mylib" JavaVersion="1.0.0" />
35+
</ItemGroup>
36+
```
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: .NET Android error XA4244
3+
description: XA4244 error code
4+
ms.date: 02/26/2024
5+
---
6+
# .NET Android error XA4244
7+
8+
## Example message
9+
10+
```
11+
error XA4244: Attribute 'JavaVersion' cannot be empty for 'ProjectReference' item '../ReferenceProject.csproj'.
12+
```
13+
14+
## Issue
15+
16+
The referenced MSBuild item XML specifies a required attribute but omits a required value.
17+
18+
For example, the `JavaArtifact` attribute on a `<ProjectReference>` cannot have an empty value.
19+
20+
Invalid:
21+
22+
```xml
23+
<ItemGroup>
24+
<ProjectReference Include="../ReferenceProject.csproj" JavaArtifact="" JavaVersion="1.0.0" />
25+
</ItemGroup>
26+
```
27+
28+
## Solution
29+
30+
To resolve this error, specify a value for the required XML attribute:
31+
32+
```xml
33+
<ItemGroup>
34+
<ProjectReference Include="../ReferenceProject.csproj" JavaArtifact="com.example:mylib" JavaVersion="1.0.0" />
35+
</ItemGroup>
36+
```

0 commit comments

Comments
 (0)