xamarin/Xamarin.Forms

New Xamarin.Forms project does not build Android project (missing resources)

开放

#8,809 创建于 2019年12月9日

 (5 条评论) (0 个反应) (0 位负责人)C# (1,926 个派生)batch import
a/buildchainfeedback-tickethelp wantedinactivep/Androids/unverifiedt/bug :bug:up-for-grabs

仓库指标

星标
 (5,644 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

This issue has been moved from a ticket on Developer Community.


Starting a new Xamarin.Forms project in the latest Visual Studio (and Visual Studio for Mac) gives an issue in the Android project. A clean project does not want to build.

resource style/Theme.AppCompat.Light.Dialog (aka com.companyname.xxx:style/Theme.AppCompat.Light.Dialog) not found.	xxx. Android				
resource style/Theme.AppCompat.Light.DarkActionBar (aka com.companyname.xxx:style/Theme.AppCompat.Light.DarkActionBar) not found.	xxx. Android				
failed linking references.	xxx. Android				
style attribute 'attr/windowNoTitle (aka com.companyname.xxx:attr/windowNoTitle)' not found.	xxx. Android		
style attribute 'attr/windowActionBar (aka com.companyname.xxx:attr/windowActionBar)' not found.	xxx. Android
style attribute 'attr/colorPrimaryDark (aka com.companyname.xxx:attr/colorPrimaryDark)' not found.	xxx. Android
style attribute 'attr/colorPrimary (aka com.companyname.xxx:attr/colorPrimary)' not found.	xxx. Android
style attribute 'attr/colorAccent (aka com.companyname.xxx:attr/colorAccent)' not found.	xxx. Android
style attribute 'attr/colorAccent (aka com.companyname.xxx:attr/colorAccent)' not found.	xxx. Android
style attribute 'attr/windowActionModeOverlay (aka com.companyname.xxx:attr/windowActionModeOverlay)' not found.	xxx. Android

Original Comments

Visual Studio Feedback System on 11/27/2019, 01:45 AM:

Bart on 11/27/2019, 02:18 AM:

Update:- Opened manifest to check the min and target version.- Moved up all Xamarin project folders one level so they are on the same level as the rest of the solution. Cleaned solution, manually deleted all bin and obj folders as well and did rebuild.First time I got an error on:"obj\Debug\90\xx.Android.dll;obj\Debug\90\xx.Android.dll" is an invalid value for the "OutputAssembly" parameter of the "Csc" task. Multiple items cannot be passed into a parameter of type "Microsoft.Build.Framework.ITaskItem".Rebuild one more time and only have warnings now.<br>Warning The preprocessor token &#39;outputfilename&#39; has been given more than one value. Choosing &#39;xx.Android.dll&#39; as the value. xx.Android <br>Warning The preprocessor token &#39;filename&#39; has been given more than one value. Choosing &#39;xx.Android.csproj&#39; as the value. xx.Android <br>Warning The preprocessor token &#39;fullpath&#39; has been given more than one value. Choosing &#39;C:\Bart\Code\yy\src\xx.Android&#39; as the value. xx.Android <br>Warning The preprocessor token &#39;assemblyname&#39; has been given more than one value. Choosing &#39;xx.Android&#39; as the value. xx.Android <br>Warning The preprocessor token &#39;rootnamespace&#39; has been given more than one value. Choosing &#39;xx.Droid&#39; as the value. xx.Android <br>Warning &quot;obj\Debug\90\xx.Android.dll;obj\Debug\90\xx.Android.dll&quot; is an invalid value for the &quot;OutputAssembly&quot; parameter of the &quot;Csc&quot; task. Multiple items cannot be passed into a parameter of type &quot;Microsoft.Build.Framework.ITaskItem&quot;. xx.Android <br>Moving up the Xamarin folders one level reduced the Android folder path from 99 to 80 characters, with another 44 characters for the csproj name.


Original Solutions

(no solutions)

贡献者指南