在Xamarin.Android进口类型定义多次 [英] Imported type defined multiple times on Xamarin.Android
本文介绍了在Xamarin.Android进口类型定义多次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
下面是我的进口:
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;
然后
var mPager = FindViewById<ViewPager> (Resource.Id.pager);
此行给我的导入类型'Android.Support.V4.View.ViewPager被定义多次
什么这里是错的?
PS:两个V4 V13和引用
ps: both v4 and v13 are referenced.
推荐答案
您不能包括V4 V13和。 V13是V4的超集,包括V4在里面。所以这就是为什么你要多个定义。取出V4的参考,它应该工作正常。
You can't include V4 and V13. V13 is a superset of V4 and includes V4 in it. So that's why you're getting multiple definitions. Remove the V4 reference and it should work fine.
这篇关于在Xamarin.Android进口类型定义多次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文