Archives - Tag: Xamarin.Android

  • Mono for Android: "aapt.exe" exited with code 1

    TL;DR

    Also available in TL;SO (too long; Stack Overflow) flavor.

    Getting this error: "aapt.exe" exited with code 1?

    Do you have any files in your Mono for Android solution that are being packaged together with the app (e.g., “AndroidResource” build action)?

    If so, make sure they don’t have anything but letters, numbers, periods, and underscores ([a-z0-9_.]) in their names.

  • Xamarin.Forms: Switching TabbedPage Tabs Programmatically

    iOS Switch Tabs and Push Page via button click

    Sometimes, your app uses tabs to separate different user activities. Sometimes, though, those activities aren’t completely independent. When that happens, you need an action in one tab to cause the user to switch to another tab. I’ll show you how to do that in code using Xamarin.Forms. In case you haven’t already started your tabs, we’ll start from the beginning. (Note: while the UI parts can be done quite well in XAML, this post will do it all in code.)

  • Workaround: Xamarin.Android long paths on Windows

    Quick answer (TL;DR)

    Create a symbolic link from your deeply-nested folder to a shorter path using one of the following commands in an Administrator prompt.

    Command Prompt

    mklink /D {desired-path-location} {actual-path-location}
    

    PowerShell [Core]

    New-Item -ItemType SymbolicLink -Path {desired-path-location} -Value {actual-path-location}
    

    After you create the symbolic link, drag the desired solution into Visual Studio rather than navigating through the link in the Open dialog, which will override to the original path.