Skip to content

Android - APT2126 XML files not found when moving built project to a different path #6924

@Eilon

Description

@Eilon

Originally opened by @janseris in dotnet/maui#5956


Description

When project is built for Android, then VS closed and project moved to a different folder, the built application cannot be started anymore.
Seems like some absolute paths are used in the output.
The following list of errors appears:

image

Závažnost	Kód	Popis	Projekt	Soubor	Řádek	Stav potlačení
Chyba	APT2126	file not found.	Tempus.Mobile.GUI	C:\Tempus.Mobile\Tempus.Mobile.GUI\obj\Debug\net6.0-android\lp\122\jl\res\values\attr.xml	1	
Chyba	APT2126	file not found.	Tempus.Mobile.GUI	C:\Tempus.Mobile\Tempus.Mobile.GUI\obj\Debug\net6.0-android\lp\122\jl\res\drawable\maui_splash_image.xml	1	
Chyba	APT2126	file not found.	Tempus.Mobile.GUI	C:\Tempus.Mobile\Tempus.Mobile.GUI\obj\Debug\net6.0-android\lp\122\jl\res\anim\nav_default_enter_anim.xml	1	
Chyba	APT2126	file not found.	Tempus.Mobile.GUI	C:\Tempus.Mobile\Tempus.Mobile.GUI\obj\Debug\net6.0-android\lp\119\jl\res\layout\tabbar.xml	1	
Chyba	APT2126	file not found.	Tempus.Mobile.GUI	C:\Tempus.Mobile\Tempus.Mobile.GUI\obj\Debug\net6.0-android\lp\119\jl\res\layout\flyoutcontent.xml	1	
Chyba	APT2126	file not found.	Tempus.Mobile.GUI	C:\Tempus.Mobile\Tempus.Mobile.GUI\obj\Debug\net6.0-android\lp\118\jl\res\anim\enterfromright.xml	1	
Chyba	APT2126	file not found.	Tempus.Mobile.GUI	C:\Tempus.Mobile\Tempus.Mobile.GUI\obj\Debug\net6.0-android\lp\122\jl\res\layout\maui_toolbar.xml	1	
Chyba	APT2126	file not found.	Tempus.Mobile.GUI	C:\Tempus.Mobile\Tempus.Mobile.GUI\obj\Debug\net6.0-android\lp\122\jl\res\anim\nav_default_pop_exit_anim.xml	1	
Chyba	APT2126	file not found.	Tempus.Mobile.GUI	C:\Tempus.Mobile\Tempus.Mobile.GUI\obj\Debug\net6.0-android\lp\119\jl\res\values\attrs.xml	1	
Chyba	APT2126	file not found.	Tempus.Mobile.GUI	C:\Tempus.Mobile\Tempus.Mobile.GUI\obj\Debug\net6.0-android\lp\118\jl\res\anim\exittoleft.xml	1	
Chyba	APT2126	file not found.	Tempus.Mobile.GUI	C:\Tempus.Mobile\Tempus.Mobile.GUI\obj\Debug\net6.0-android\lp\118\jl\res\anim\enterfromleft.xml	1	
Chyba	APT2126	file not found.	Tempus.Mobile.GUI	C:\Tempus.Mobile\Tempus.Mobile.GUI\obj\Debug\net6.0-android\lp\123\jl\res\xml\microsoft_maui_essentials_fileprovider_file_paths.xml	1	
Chyba	APT2126	file not found.	Tempus.Mobile.GUI	C:\Tempus.Mobile\Tempus.Mobile.GUI\obj\Debug\net6.0-android\lp\122\jl\res\layout\navigationlayout.xml	1	
Chyba	APT2126	file not found.	Tempus.Mobile.GUI	C:\Tempus.Mobile\Tempus.Mobile.GUI\obj\Debug\net6.0-android\lp\122\jl\res\drawable\maui_splash.xml	1	
Chyba	APT2126	file not found.	Tempus.Mobile.GUI	C:\Tempus.Mobile\Tempus.Mobile.GUI\obj\Debug\net6.0-android\lp\119\jl\res\values\styles.xml	1	
Chyba	APT2126	file not found.	Tempus.Mobile.GUI	C:\Tempus.Mobile\Tempus.Mobile.GUI\obj\Debug\net6.0-android\lp\118\jl\res\values\strings.xml	1	
Chyba	APT2126	file not found.	Tempus.Mobile.GUI	C:\Tempus.Mobile\Tempus.Mobile.GUI\obj\Debug\net6.0-android\lp\122\jl\res\values\colors.xml	1	
Chyba	APT2126	file not found.	Tempus.Mobile.GUI	C:\Tempus.Mobile\Tempus.Mobile.GUI\obj\Debug\net6.0-android\lp\122\jl\res\layout\drawer_layout.xml	1	
Chyba	APT2126	file not found.	Tempus.Mobile.GUI	C:\Tempus.Mobile\Tempus.Mobile.GUI\obj\Debug\net6.0-android\lp\122\jl\res\anim\nav_default_exit_anim.xml	1	
Chyba	APT2126	file not found.	Tempus.Mobile.GUI	C:\Tempus.Mobile\Tempus.Mobile.GUI\obj\Debug\net6.0-android\lp\119\jl\res\layout\toolbar.xml	1	
Chyba	APT2126	file not found.	Tempus.Mobile.GUI	C:\Tempus.Mobile\Tempus.Mobile.GUI\obj\Debug\net6.0-android\lp\119\jl\res\layout\rootlayout.xml	1	
Chyba	APT2126	file not found.	Tempus.Mobile.GUI	C:\Tempus.Mobile\Tempus.Mobile.GUI\obj\Debug\net6.0-android\lp\118\jl\res\anim\exittoright.xml	1	
Chyba	APT2126	file not found.	Tempus.Mobile.GUI	C:\Tempus.Mobile\Tempus.Mobile.GUI\obj\Debug\net6.0-android\lp\122\jl\res\values\styles.xml	1	
Chyba	APT2126	file not found.	Tempus.Mobile.GUI	C:\Tempus.Mobile\Tempus.Mobile.GUI\obj\Debug\net6.0-android\lp\122\jl\res\layout\fragment_backstack.xml	1	
Chyba	APT2126	file not found.	Tempus.Mobile.GUI	C:\Tempus.Mobile\Tempus.Mobile.GUI\obj\Debug\net6.0-android\lp\122\jl\res\anim\nav_default_pop_enter_anim.xml	1	
Chyba	APT2126	file not found.	Tempus.Mobile.GUI	C:\Tempus.Mobile\Tempus.Mobile.GUI\obj\Debug\net6.0-android\lp\119\jl\res\layout\shellcontent.xml	1	
Chyba	APT2126	file not found.	Tempus.Mobile.GUI	C:\Tempus.Mobile\Tempus.Mobile.GUI\obj\Debug\net6.0-android\lp\119\jl\res\layout\bottomtablayout.xml	1	

Steps to Reproduce

  1. Create a new MAUI App
  2. Build for Android (Debug) - just click Start
  3. Close VS
  4. Move project (with bin and obj folders now created) to a different folder/directory
  5. Try run the project again

Version with bug

Preview 14 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 11 (API 30) and maybe more

Did you find any workaround?

Clean Solution
Build again

Relevant log output

No response

Metadata

Metadata

Labels

Area: App+Library BuildIssues when building Library projects or Application projects.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions