Reputation: 664
I try to do a hamburger menu, but I have an exception when I try to compile the solution. I'm developing a Xamarin Cross Platform Application.
I have the exception:
obj\Debug\res menu.png project.Android invalid resource directory name
And the code when I use the menu.png file is:
Icon = Device.OS == TargetPlatform.iOS ? "menu.png" : null;
I add the png file as an already exists element on "Resources" folder at iOS and Android project. I check that the file exists in the folder and I follow this steps to try to fix it, but it doesn't work for me:
Invalid resource directory name "font" Xamarin Android
Can anyone helps me? Thanks!
Upvotes: 0
Views: 2891
Reputation: 51
I resolved issue by adding build tools version 27.0.3 to my sdk location/build-tools. check the required build tools version in obj/debug/[compile-version]/build.props
Upvotes: 0
Reputation: 664
I fix it! I deleted the png file on Android resources and it worked correctly. I suppose I import twice the file (on portable solution and on Android solution) and that makes the exception.
Upvotes: 2