When I try to compile and run the MAUI project, I get an APT2000 error
See original GitHub issueDescription
I am in the process of developing my mobile application on MAUI. Just recently I finished some of the development on my home PC and uploaded everything to the GitHub repository. After some time away, I decided to continue working on the project on my laptop. My laptop was not configured for android emulation, so I did everything as per the tutorial: enabled Hyper-V components, in the Visual Studio 2022 Tools tab -> Android -> Android SDK Manager. After opening the Android SDK Manager, I installed the following components (screenshot 1): screenshot 1 P.s. I apologize, most of the interface will be in Russian, but I will try to translate it when necessary After installing the emulator, I proceeded to set up the device that I will emulate. I chose the default option, i.e. Pixel 5 on Android 13. I didn’t change anything in its settings. After installing this image, I decided to run the project, but I was constantly getting APT2000 error, even if I connected my phone via USB.
I tried reinstalling the Android emulator and also reinstalling the emulated device. I tried uninstalling and downloading the project from GitHub and launching it. I tried running the project and emulating it through my Android phone. I expected that the project will start as it should always start for everyone, i.e. it opens the application on the emulated device and displays the interface and application logic, but it didn’t happen
P.s. The problem itself was posted by me back on Stack Overflow, however even there, there was no similar problem to mine
Steps to Reproduce
- Create a new MAUI project
- Configure the Android emulator using the Android SDK and Android Device Manager
- Try to get the project up and running
Expected outcome: Started and running application with initial template, which is set by default by MAUI developers Actual outcome: “Error APT2000 Cannot find the specified file. (2). -> MyAppName -> C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\33.0.46\tools\Xamarin.Android.Aapt2.targets -> 212”
Link to public reproduction project repository
https://github.com/TungusSs/BelfertApp/tree/feature-branch
Version with bug
7.0.86
Last version that worked well
Unknown/Other
Affected platforms
Android, I was not able test on other platforms
Affected platform versions
Android 13
Did you find any workaround?
Unfortunately, no.
Relevant log output
Error APT2000 Cannot find the specified file. (2). -> MyAppName -> C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\33.0.46\tools\Xamarin.Android.Aapt2.targets -> 212
Issue Analytics
- State:
- Created 2 months ago
- Comments:9 (5 by maintainers)
Ok, great! I do think it’s the same known issue I linked above. We have some ideas on invoking
aapt2
in a different way to work around this problem, but I’m not sure when we’ll get that in.Duplicate of https://github.com/xamarin/xamarin-android/issues/6925