While using Xamarin, I have experienced a wide variety of issues, ranging from simple, to very difficult. Which sometimes can drive me crazy.
These are the most common problems and how to solve it:
1-Java.exe exited with code 1.
1-Download the last version of ProGuard zip https://sourceforge.net/projects/proguard/files/
2-UnZip the file and copy the folder content in the route where your SDK is located (specifically in the folder tools/proguard), for example:
If you would like to know where the root of your SDK is located, click in Preferences in your Xamarin project, and copy the URL shown in the SDK option
3-Replace the actual folder content with the content inside the Proguard folder. Make sure to keep these configuration files there:
4-Close your solution, open it again, clean and rebuild.
2-When running the app, it opens and immediately close
Go to your project options, and disable Fast deployment
3-Xamarin support package error
Please install package: ‘Xamarin.Android.Support.Design’ available in SDK installer. Please install package: ‘Xamarin.Android ….
Go to this root:
- Mac: ~/.local/share/Xamarin/
Delete all the files there and then go to your project and click on rebuild all.
4-Some missing dependency of a package in the project but you see the reference there
Go to the package folder, delete the package, then go to the project and click on Restore.
5-Project does not want to debug in Android
In your Android project, do right click in the solution and click in options.
There make you sure you have “Use Shred Mono Runtime” checked.
6-Error: Fody: An unhandled exception occurred
Clean the project before attempting the build.
7- Architecture is not supported
In your Android project, do right click in the solution and click in options. There select the Architecture you want to support:
More information about it: https://developer.xamarin.com/guides/android/application_fundamentals/cpu_architectures/
These are the most common problems that have happened to me, some extra recommendations in case you have another different issue and you don’t know how to solve, could be:
1-Go to your project folder and delete the Bin/Obj folders.
2-Close your Xamarin Studio and Open it again.
3-Make sure your Xamarin Studio/ Visual Studio is up to date, if not update it.
4-If none of the above works restart your computer (Believe that works sometimes).
Hope that helps someone! :). Happy coding!