Commit 56e31f5
[Xamarin.Android.Build.Tasks] Avoid XA5207 for design-time builds (#7434)
Fixes: #7405
Raising an XA5207 error during a [design time build][0] in
Visual Studio (Windows) can cause problems in the auto sdk installer:
error XA5207: Could not find android.jar for API level 31.
This means the Android SDK platform for API level 31 is not installed.
Either install it in the Android SDK Manager (Tools > Android > Android SDK Manager…),
or change the Xamarin.Android project to target an API version that is installed.
(C:\Program Files (x86)\Android\android-sdk\platforms\android-31\android.jar missing.)
The design time build is run for all frameworks; you can end up in a
position where you have the Windows framework selected in the IDE and
the auto sdk installer will try to install an Android framework.
Its very confusing for the user.
Avoid raising error XA5207 during design time builds.
[0]: https://github.com/dotnet/project-system/blob/3f5fb23d3fa91719c93b68f56e99aba6b18939aa/docs/design-time-builds.md1 parent 0e33557 commit 56e31f5
File tree
4 files changed
+15
-8
lines changed- src/Xamarin.Android.Build.Tasks
- Tasks
- Tests/Xamarin.Android.Build.Tests
- Utilities
4 files changed
+15
-8
lines changedLines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
87 | | - | |
| 89 | + | |
| 90 | + | |
88 | 91 | | |
89 | 92 | | |
90 | 93 | | |
91 | | - | |
92 | | - | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1365 | 1365 | | |
1366 | 1366 | | |
1367 | 1367 | | |
| 1368 | + | |
| 1369 | + | |
1368 | 1370 | | |
1369 | 1371 | | |
1370 | 1372 | | |
| |||
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
446 | | - | |
| 446 | + | |
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
450 | | - | |
451 | | - | |
452 | | - | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
453 | 455 | | |
454 | 456 | | |
455 | 457 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
103 | 105 | | |
104 | 106 | | |
105 | 107 | | |
| |||
0 commit comments