Xamarin.Forms Build Errors

This post is for me to track issues (and hopefully solutions) to build errors that occur when trying to build and publish apps.

iOS

“codesign” exited with code 1

This usually pops up when the certificate or provisioning profile being used to build the app has expired. Check your KeyChain or Apple account and generate a new one.

“codesign” exited with code 3

This is an error message related to the environment configurations. Specifically I had 2 configurations set for Release|iPhone. One had the correct distribution account and profile against it – the other had my developer details. So although the Visual Studio UI showed the distribution details had been selected, the build/archive process was obviously picking up my developer details. [March 2021]

Android

adb operation not permitted

Trying to publish a debug version of an app to a new Android phone running Android 11 I came across the above error. It seems the changes by Android relating to External Storage access have caused a problem with ‘Use Fast Deployment’ https://github.com/xamarin/xamarin-android/issues/4996

I unchecked this option and the app deployed successfully. [March 2021]

Failed to generate Java type for class: Android.Support.V4.View.Accessibility.AccessibilityManagerCompat/ITouchExplorationStateChangeListenerImplementor due to MAX_PATH

The path to your code is too long for Windows! Windows 10 will allow you to now use longer paths, or you can move/rename you project location to make it a bit smaller.

https://stackoverflow.com/questions/60539637/android-build-error-failed-to-create-javatypeinfo-for-class-xamarin

https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation#enable-long-paths-in-windows-10-version-1607-and-later

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s