2016-08-22 6 views
0

Syncfusion SfNavigationDrawer을 사용하여 을 만들려고하는데, 다음과 같은 예외가 발생합니다. 내가 Xamarin.Forms 2.3.0.49Syncfusion ES 14.2.0.26을 사용하고내비게이션 드로어를 사용할 때 'Java.Lang.NoSuchMethodError` 예외가 발생했습니다.

public class MainPage : ContentPage 
{  
    public MainPage() 
    { 
     SfNavigationDrawer nav = new SfNavigationDrawer(); 

     StackLayout mainStack = new StackLayout(); 
     mainStack.Opacity = 1; 
     mainStack.Orientation = StackOrientation.Vertical; 
     mainStack.HeightRequest = 500; 
     mainStack.BackgroundColor = Color.White; 

     ObservableCollection<String> list = new ObservableCollection<string>(); 
     list.Add("Home"); 


     ListView listView = new ListView(); 
     listView.WidthRequest = 200; 
     listView.VerticalOptions = LayoutOptions.FillAndExpand; 
     listView.ItemsSource = list; 
     mainStack.Children.Add(listView); 

     nav.DrawerContentView = mainStack; 


     StackLayout headerLayout = new StackLayout(); 
     headerLayout.Orientation = StackOrientation.Vertical; 

     Image image = new Image(); 
     image.Source = ImageSource.FromFile("user.png"); 
     headerLayout.Children.Add(image); 

     Label header = new Label(); 
     headerLayout.Children.Add(header); 
     nav.DrawerHeaderView = headerLayout; 



     Button imageButton = new Button(); 
     imageButton.WidthRequest = 50; 

     Label homeLabel = new Label(); 
     homeLabel.Text = "Home"; 
     homeLabel.FontSize = 15; 
     homeLabel.TextColor = Color.White; 
     homeLabel.HorizontalTextAlignment = TextAlignment.Center; 
     homeLabel.VerticalTextAlignment = TextAlignment.Center; 

     StackLayout headerFrame = new StackLayout(); 
     headerFrame.Orientation = StackOrientation.Horizontal; 
     headerFrame.Children.Add(imageButton); 
     headerFrame.Children.Add(homeLabel); 

     Label mainLabel = new Label(); 
     mainLabel.Text = "Lorem..."; 

     StackLayout ContentFrame = new StackLayout(); 
     ContentFrame.Orientation = StackOrientation.Vertical; 
     ContentFrame.BackgroundColor = Color.White; 
     ContentFrame.Children.Add(headerFrame); 
     ContentFrame.Children.Add(mainLabel); 
     nav.ContentView = ContentFrame; 

     nav.Position = Position.Left; 
     nav.Transition = Transition.SlideOnTop; 

     this.Content = nav; 

    } 
} 

:

Java.Lang.NoSuchMethodError: no method with name='setClipToOutline' signature='(Z)V' in class Lcom/xamarin/forms/platform/android/FormsViewGroup;

내 코드입니다. 그리고 XamarinAndroid build-tools을 업데이트하면 도움이되지 않습니다.

답변

1

나는 동일한 문제가있었습니다. 다음은 Syncfusion 지원팀의 답변입니다. "이름이 setClipOutline 인 메소드가 없습니다"라는보고 된 충돌이 최신 Essential Studio Volume 2 서비스 팩 2, 2016 (버전 14.2.0.32)에서 수정되었으며 아래에서 다운로드 할 수 있습니다. 다음 링크.

https://www.syncfusion.com/forums/125638/essential-studio-2016-volume-2-service-pack-release-v14-2-0-32-available-for-download

과제를 해결한다.

1
관련 문제