Troubleshooting MAUI Issues
Creating a 100% perfect native management tool is nearly impossible, and sooner or later you'll run into various issues with some part of the workflow. This guide documents common issues with possible solutions.
MAUI Toolbox
Every MAUI developer learns a few common techniques for debugging issues, and you should incorporate these into your workflow:
Search first
Any time you encounter an issue with .NET, MAUI, workloads, or emulators, your first step should be to copy and paste the error into a search engine. Napacitor uses the standard .NET MAUI toolchain, so chances are if you run into something, many MAUI developers have as well, and there's a solution out there. It could be as simple as updating a workload, restoring packages, or invalidating caches.
Restore and rebuild
Run dotnet restore on the host project, then rebuild. In Visual Studio, use Build > Rebuild Solution; this fixes a surprising number of transient issues.
nap clean / manual bin+obj wipe
npx nap clean --target <platform> runs dotnet clean for the host. If an incremental build produced a broken binary, dotnet clean alone is sometimes not enough — delete maui/bin/ and maui/obj/ manually and rebuild from scratch.
Windows: if the app is running, its DLLs are locked and cleaning will fail. Stop the app first, then clean/rebuild.
Invalidate caches / restart
If you're confident you fixed an issue but the IDE or build disagrees, often the solution is to restart the IDE or the machine. For Visual Studio, close and reopen the solution first.
General workflow issues
npm install fails with ERESOLVE peer dependency conflict
Napacitor beta packages declare peer dependencies like @napacitor/core@^0.1.0, which strict npm rejects when prerelease versions are involved. Install with:
npm install --legacy-peer-deps
npm ls reporting core as invalid afterwards is expected and does not affect building or running.
nap add maui fails: directory already exists
The command refuses to overwrite an existing host. If you want to regenerate:
rm -rf maui # Windows: Remove-Item -Recurse -Force maui
npx nap add maui
Any manual host modifications are lost, so re-apply them after regenerating.
nap sync / nap copy fails: webDir missing or no index.html
nap requires the directory pointed to by webDir in napacitor.config.json to exist and contain an index.html. If your webDir is a build output directory like dist/, run your frontend build first (npm run build), then npx nap sync.
I changed my web code but the app doesn't show it
The app runs the copy inside maui/wwwroot/, not your source directory. The fix is the sync step:
npm run build # produce fresh web assets (if you have a build step)
npx nap sync # copy them into the host
Then rebuild/rerun the host. Forgetting npx nap sync is the most common cause of "my changes don't appear".
open (macOS) fails: file not found
The generated app bundle name contains spaces (e.g. Napacitor Demo.app). Quote the path when opening it, and remember the path contains the same TFM version number you used in the build command.
Toolchain issues
Build fails with NETSDK1056 / "requires Xcode 27.x" / workload errors
The versioned TFM (net10.0-ios26.0, net10.0-maccatalyst26.0) must match the major version of the installed workload pack (which matches an Xcode major version).
Check what's installed:
dotnet workload list
Then align either side:
- Align the TFM (recommended): change
<TargetFrameworks>inmaui/App.csprojto the version reported bydotnet workload list, and use the same version in any-fbuild commands; - Align the toolchain: upgrade Xcode to the matching major version, or install a matching pack:
sudo dotnet workload install ios maccatalyst.
The template sets ValidateXcodeVersion=false, so minor Xcode version differences are skipped — only the major version must line up.
Build fails with SupportedOSPlatformVersion / LSMinimumSystemVersion errors
Example: The SupportedOSPlatformVersion '15.0' is not supported, or an Info.plist value conflicting with the csproj. Fix:
- Set
<SupportedOSPlatformVersion>inmaui/App.csprojto a supported value (17.0 or higher for iOS/Mac Catalyst); - Remove the
LSMinimumSystemVersionkey frommaui/Platforms/MacCatalyst/Info.plistif present — the csproj generates it; a hand-written copy conflicts.
Android issues
XA0010 "No devices available" when running
npx nap run --target android requires an online emulator or device (adb devices must show status device). The build itself succeeding with only the deployment failing is the signature of this problem.
- Start the emulator (or plug in a device):
# Windows (SDK under %LOCALAPPDATA%\Android\Sdk)& "$env:LOCALAPPDATA\Android\Sdk\emulator\emulator.exe" -avd <AVD_NAME>
- Wait until it has fully booted:
adb wait-for-device shell "while [ -z $(getprop sys.boot_completed) ]; do sleep 1; done"
- Verify with
adb devices(statusdevice, notoffline), then run the command again.
"Please select Android SDK" / missing Android platform packages
The Android workload needs an Android SDK with the platform API you target (e.g. API 36). Install the platform and build-tools via Android Studio's SDK Manager, and make sure the ANDROID_HOME environment variable (or AndroidSdkDirectory in the csproj) points at the SDK.
APK can't be installed
Often caused by an existing app with the same package name. Remove the old app from the device/emulator and make sure <ApplicationId> in App.csproj does not conflict with other apps you develop. Finally, clean and rebuild.
iOS issues
iOS simulator shows a black screen (very old Intel Macs)
On 2014–2015-era Intel Macs with integrated graphics, the iOS 26 simulator runtime may not render (black screen; system apps also fail to open). This is a hardware limitation, not a project problem — use the Mac Catalyst target (npx nap run --target maccatalyst) on such machines instead.
Xcode indexing forever
Xcode sometimes gets stuck indexing forever. The only solution is to Force Quit Xcode (via Activity Monitor) and start it up again.
Windows issues
nap run --target windows fails with MSB3073 exit code 3
Unlike Android/iOS, the .NET SDK's -t:Run target on Windows does not build first — a fresh host has no App.exe to execute. The Windows workflow is build-then-run:
npx nap build --target windows
npx nap run --target windows
App crashes at startup with exit code 0xC000027B after a previously failed build
If a build once failed (e.g. a compile error) and the app now crashes within a second of launching (stowed exception), the incremental state in obj/ is likely corrupt — subsequent builds report "0 errors" but produce broken binaries.
Delete the host's build output manually and rebuild from scratch:
Remove-Item -Recurse -Force maui/bin, maui/obj
npx nap build --target windows
dotnet clean alone is often insufficient here. If the app's App.exe.WebView2 data directory is locked after force-killing the app, clean it up too.
Clean/rebuild fails because DLLs are locked
A running Windows app locks the build output DLLs. Stop the app, then run npx nap clean --target windows (or delete bin//obj/) and rebuild.
Plugin Not Implemented
On any platform, this can happen if the runtime doesn't find the plugin or can't inject the bridge into the WebView. The JS side sees a NapacitorException with code NOT_IMPLEMENTED.
- Make sure the plugin package is installed and appears in
package.json; - Run
npx nap sync— it regeneratesmaui/napacitor.build.props, which wires every installed plugin's C# project into the host; - Rebuild the host.
If you still get "Plugin not implemented", verify the plugin's C# project is listed in maui/napacitor.build.props. In the browser, the same code path is expected — plugins fall back to their web implementations, and platform-only methods throw.
Recreating your project
Napacitor lets you manage your own host project. Like any IDE-backed project, sometimes things get so out of sync that the only solution is to rebuild the project.
- Copy any custom code you wrote in
maui/(custom pages, platform files, etc.) somewhere safe outside the directory; - Make sure you run an updated CLI:
npm install -D @napacitor/cli@latest; - Remove the host:
rm -rf maui/; - Recreate it:
npx nap add maui; - Copy your saved files back into the project and re-run
npx nap sync.