forked from dotnet/android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into maybe-fix-zip
* main: Add Unit Test for testOnly apps (dotnet#7637) [build] Only build the latest API level (dotnet#7786) [Xamarin.Android.Build.Tasks] Improve aapt2+file not found handling (dotnet#7644) [MSBuildDeviceIntegration] Fix duplicated test parameter (dotnet#7809) [tests] Bump NUnit versions to latest (dotnet#7802) [Microsoft.Android.Sdk.ILLink] target `net7.0` temporarily (dotnet#7803) [tests] `InstallAndroidDependenciesTest` can use `platform-tools` 34.0.0 (dotnet#7800) Bump to xamarin/Java.Interop/main@9e0a469 (dotnet#7797) [Xamarin.Android.Build.Tasks] FileWrites&libraryprojectimports.cache (dotnet#7780) Bump to dotnet/installer@d25a3bb 8.0.100-preview.2.23105.6 (dotnet#7769) [lgtm] Fix LGTM-reported issues (dotnet#1074) [ci] Report issues in the API docs build log (dotnet#7784)
- Loading branch information
Showing
37 changed files
with
706 additions
and
864 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
queries: | ||
- exclude: cs/campaign/constantine |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
title: Xamarin.Android error APT2264 | ||
description: APT2264 error code | ||
ms.date: 12/16/2022 | ||
--- | ||
# Xamarin.Android error APT2264 | ||
|
||
## Issue | ||
|
||
The tool `aapt2` is unable to resolve one of the files it was passed. | ||
This is generally caused by the path being longer than the Maximum Path | ||
length allowed on windows. | ||
|
||
## Solution | ||
|
||
The best way to avoid this is to ensure that your project is not located | ||
deep in the folder structure. For example if you create all of your | ||
projects in folders such as | ||
|
||
`C:\Users\shelly\Visual Studio\Android\MyProjects\Com.SomeReallyLongCompanyName.MyBrillantApplication\MyBrilliantApplicaiton.Android\` | ||
|
||
you may well encounter problems with not only `aapt2` but also Ahead of Time | ||
compilation. Keeping your project names and folder structures short and | ||
concise will help work around these issues. For example instead of the above | ||
you could use | ||
|
||
`C:\Work\Android\MyBrilliantApp` | ||
|
||
Which is much shorter and much less likely to encounter path issues. | ||
|
||
However this is no always possible. Sometimes a project or a environment requires | ||
deep folder structures. In this case enabling long path support in Windows *might* | ||
be enough to get your project working. Details on how to do this can be found | ||
[here](https://learn.microsoft.com/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later). | ||
|
||
|
||
If long path support does not work changing the location of the | ||
`$(BaseIntermediateOutputPath)` can help solve these problems. In order for this | ||
to work the setting MUST be changed before ANY build or restore occurs. To do this | ||
you can make use of the MSBuild `Directory.Build.props` support. | ||
|
||
Creating a `Directory.Build.props` file in your solution or project directory which | ||
redefines the `$(BaseIntermediateOutputPath)` to somewhere nearer the root of the drive | ||
with solve these issues. Adding a file with the following contents will create the `obj` | ||
directory in a different location of your choosing. | ||
|
||
``` | ||
<Project> | ||
<PropertyGroup> | ||
<BaseIntermediateOutputPath Condition=" '$(OS)' == 'Windows_NT' ">C:\Intermediate\$(ProjectName)</BaseIntermediateOutputPath> | ||
<BaseIntermediateOutputPath Condition=" '$(OS)' != 'Windows_NT' ">/tmp/Intermediate/$(ProjectName)</BaseIntermediateOutputPath> | ||
</PropertyGroup> | ||
</Project | ||
``` | ||
|
||
Using this technique will reduce the lengths of the paths sent to the various tools like `aapt2`. | ||
Note this is generally only a Windows issue. So there is no need to override the `$(BaseIntermediateOutputPath)` | ||
on Mac or Linux based environments. However you might want to override everywhere to be consistent. |
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
Oops, something went wrong.