im trying to create an android application with xamarin (VS 2017 15.5.5). The default settings (xamarin cross-platform - blank app / .net standard, targeting android 7) generates project that can be deployed via live player, but the build process generates error
Error The "ResolveLibraryProjectImports" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load assembly 'XamTest, Version=0.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'XamTest.dll'
....
....
My goal is to create android application for android 4 (4.0.3 / 4.1) and higher, but changing the settings (target framework + min. version + target android ver. all set to 4.1) in project properties results in 15 errors of these kind:
Error: NU1202 Package Xamarin.Android.Support.v7.MediaRouter 25.4.0.2 is not compatible with monoandroid41 (MonoAndroid,Version=v4.1). Package Xamarin.Android.Support.v7.MediaRouter 25.4.0.2 supports: monoandroid70 (MonoAndroid,Version=v7.0)
Error: No resource found that matches the given name: attr 'colorAccent'. XamTest.Android C:DevXamTestXamTestXamTest.AndroidResourcesvaluesstyles.xml
So i deleted all support libraries in NuGet package manager, some undefined styles and two pre-generated xaml files (Toolbar, Taskbar). Now i have 38 errors of this type
DevXamTestXamTestXamTest.AndroidobjDebug
esourcecache96A6E7245B001AFA9465D8F3C01B0DCD
eslayout
otification_template_big_media.xml:42: error: No resource identifier found for attribute 'layoutDirection' in package 'android' XamTest.Android C:DevXamTestXamTestXamTest.AndroidC
and one error
Error NU1202 Package Xamarin.Android.Support.Design 23.3.0 is not compatible with monoandroid41 (MonoAndroid,Version=v4.1). Package Xamarin.Android.Support.Design 23.3.0 supports: monoandroid43 (MonoAndroid,Version=v4.3)
No support library is linked (only xamarin.forms) so i dont understand where Suppurt.Design comes from...
I have spent two days with sdudying, reading doc, tutorials etc. but i havent found any suitable answer. So, is there any simple way how to set up an Android project targeting Android 4.1?
Thank you.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…