You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Android - APT2000 build error when maui-blazor #7639
C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\33.0.4\tools\Xamarin.Android.Aapt2.targets(212,3): error APT2000: The system cannot find the file specified. (2). [D:\ci\Jenkins\workspace\abp-commercial-nightly\volo\abp\templates\app-pro\aspnet-core\src\MyCompanyName.MyProjectName.MauiBlazor\MyCompanyName.MyProjectName.MauiBlazor.csproj::TargetFramework=net7.0-android]
I am facing this error when build Maui-Blazor project.
I updated all related SDK but problem continues.
This issue is not related #6925.
This will give us more verbose aapt2 output. It should help narrow down which file is causing the error.
On a side note, the path you have D:\ci\Jenkins\workspace\abp-commercial-nightly\volo\abp\templates\app-pro\aspnet-core\src\MyCompanyName.MyProjectName.MauiBlazor\MyCompanyName.MyProjectName.MauiBlazor.csproj might cause some issues on windows. Windows has a max command line length which you might hit when building release builds with aot.
I'm not seeing anyting obvious in the logs. aapt2 is raising that error, but its not reporting which file it cannot find.
I will try to repo here (not luck so far).
Are you getting this on a maui-blazor template? If so can you zip up the entire project and attach it to this issue please?
this problem is related to Windows long path. but the error message that aapt2 is rasing is not clear. developers can easily fall into this issue, so we should find a way to expose this exception.
Setting a shorter BaseIntermediateOutputPath (and leaving the project where it is) might also help.
You will need to place this in a Directory.Build.props file next to your project/solution.
Setting a shorter BaseIntermediateOutputPath (and leaving the project where it is) might also help. You will need to place this in a Directory.Build.props file next to your project/solution.
Activity
dellis1972 commentedon Dec 15, 2022
@skoc10
As per the other bug can you add the following to your project
then build (from clean) on the command line again and post the logs? We need the binlog file
so you need to run
This will give us more verbose
aapt2output. It should help narrow down which file is causing the error.On a side note, the path you have
D:\ci\Jenkins\workspace\abp-commercial-nightly\volo\abp\templates\app-pro\aspnet-core\src\MyCompanyName.MyProjectName.MauiBlazor\MyCompanyName.MyProjectName.MauiBlazor.csprojmight cause some issues on windows. Windows has a max command line length which you might hit when building release builds with aot.skoc10 commentedon Dec 15, 2022
msbuild.binlog.zip
dellis1972 commentedon Dec 15, 2022
@skoc10
I'm not seeing anyting obvious in the logs.
aapt2is raising that error, but its not reporting which file it cannot find.I will try to repo here (not luck so far).
Are you getting this on a maui-blazor template? If so can you zip up the entire project and attach it to this issue please?
ebicoglu commentedon Dec 16, 2022
this problem is related to Windows long path. but the error message that
aapt2is rasing is not clear. developers can easily fall into this issue, so we should find a way to expose this exception.dellis1972 commentedon Dec 16, 2022
It might also be worth looking at some of the suggestions in https://learn.microsoft.com/en-us/xamarin/android/troubleshooting/questions/path-too-long-exception and see if they work.
Setting a shorter
BaseIntermediateOutputPath(and leaving the project where it is) might also help.You will need to place this in a
Directory.Build.propsfile next to your project/solution.skoc10 commentedon Dec 16, 2022
Thanks.
Directory.Build.propsfile worked!dellis1972 commentedon Dec 16, 2022
Excelent.
While we cannot fix the error in
aapt2I did open a PR which should improve the error messaging a bit #7644.