简体   繁体   English

导入的类型在Xamarin.Android上定义了多次

[英]Imported type defined multiple times on Xamarin.Android

Here are my imports: 这是我的进口商品:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Widget;    
using Android.Support.V4.View;

Then 然后

var mPager = FindViewById<ViewPager> (Resource.Id.pager);

This line gives me The imported type 'Android.Support.V4.View.ViewPager' is defined multiple times 这行给我导入的类型'Android.Support.V4.View.ViewPager'被多次定义

what is wrong in here? 这是怎么了

ps: both v4 and v13 are referenced. ps:同时引用了v4和v13。

You can't include V4 and V13. 您不能包含V4和V13。 V13 is a superset of V4 and includes V4 in it. V13是V4的超集,并且其中包含V4。 So that's why you're getting multiple definitions. 这就是为什么您要获得多个定义的原因。 Remove the V4 reference and it should work fine. 删除V4参考,它应该可以正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM