我在styles.xml中有以下样式定义
C:\Program Files (x86)\Android\android-sdk\build-tools\23.0.1\aapt.exe package -f -m -M C:\Users\PETER\AppData\Local\Temp\mygzqwbf.1je\manifest\AndroidManifest.xml -J C:\Users\PETER\AppData\Local\Temp\mygzqwbf.1je --custom-package itellermobile.itellermobile -F C:\Users\PETER\AppData\Local\Temp\mygzqwbf.1je\resources.apk.bk -S obj\Debug\res -S "C:\Users\PETER\documents\visual studio 2015\Projects\ItellerMobile\ItellerMobile\obj\Debug\resourcecache\540C541E478EC7AF6B0582AC38E63A34\res" -S "C:\Users\PETER\documents\visual studio 2015\Projects\ItellerMobile\ItellerMobile\obj\Debug\resourcecache\0974850E4C4F1F7371367353B385BA20\res" -S "C:\Users\PETER\documents\visual studio 2015\Projects\ItellerMobile\ItellerMobile\obj\Debug\resourcecache\60F6BFFE70A5DB5BABCB5A2664F894BC\res" -S "C:\Users\PETER\documents\visual studio 2015\Projects\ItellerMobile\ItellerMobile\obj\Debug\resourcecache\6AAAD303D33548E7A91E1A02109A666A\res" -I "C:\Program Files (x86)\Android\android-sdk\platforms\android-24\android.jar" --auto-add-overlay --no-version-vectors
No resource found that matches the given name: attr 'borderWidth'.
No resource found that matches the given name: attr 'rippleColor'.
Error retrieving parent for item: No resource found that matches the given name 'Widget.Design.TabLayout'.
No resource found that matches the given name: attr 'tabBackground'.
No resource found that matches the given name: attr 'tabIndicatorColor'.
No resource found that matches the given name: attr 'tabIndicatorHeight'.
No resource found that matches the given name: attr 'tabPaddingEnd'.
No resource found that matches the given name: attr 'tabPaddingStart'.
No resource found that matches the given name: attr 'tabSelectedTextColor'.
No resource found that matches the given name: attr 'tabTextAppearance'.
Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.Design.Tab'.
No resource found that matches the given name: attr 'mrl_rippleAlpha'.
No resource found that matches the given name: attr 'mrl_rippleColor'.
No resource found that matches the given name: attr 'mrl_rippleHover'.
No resource found that matches the given name: attr 'mrl_rippleOverlay'.
No resource found that matches the given name: attr 'mrl_rippleColor'.
Done building project "ItellerMobile.csproj" -- FAILED.
Build FAILED.
一切看起来都不错但是当我尝试在Microsoft Visual Studio 2015中编译解决方案时,我收到以下错误
public class ValuesController : Controller
{
private IHostingEnvironment _env;
public ValuesController(IHostingEnvironment env)
{
_env = env;
}
public IActionResult Get()
{
var webRoot = _env.WebRootPath;
var file = Path.Combine(webRoot, "test.txt");
File.WriteAllText(file, "Hello World!");
return OK();
}
}
我搜索过,找不到任何实质性的帮助。
答案 0 :(得分:0)
看起来你的android支持库依赖项不匹配,检查你的解决方案中的packages.config确保所有的android版本都匹配,EG看起来像这样:
package id =“Xamarin.Android.Support.Design”version =“23.1.1.1”targetFramework =“monoandroid51” package id =“Xamarin.Android.Support.v4”version =“23.1.1.1”targetFramework =“monoandroid51” package id =“Xamarin.Android.Support.v7.AppCompat”version =“23.1.1.1”targetFramework =“monoandroid51” package id =“Xamarin.Android.Support.v7.CardView”version =“23.1.1.1”targetFramework =“monoandroid51” package id =“Xamarin.Android.Support.v7.RecyclerView”version =“23.1.1.1”targetFramework =“monoandroid51”
然后,如果所有检出都检查您的项目引用,请确保它们不是指库外的旧版本。
您还可以删除在包文件中遗留下来的任何旧库副本(使用文件资源管理器查找)