问题
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
what is wrong in here?
ps: both v4 and v13 are referenced.
回答1:
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.
来源:https://stackoverflow.com/questions/23496549/imported-type-defined-multiple-times-on-xamarin-android