위 예제의 CallHistoryPage.xaml 파일은 다음과 같다.
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:local="clr-namespace:Phoneword;assembly=Phoneword"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Phoneword.CallHistoryPage">
<ContentPage.Padding>
<OnPlatform x:TypeArguments="Thickness"
iOS="20, 40, 20, 20"
Android="20, 20, 20, 20"
WinPhone="20, 20, 20, 20" />
</ContentPage.Padding>
<ContentPage.Content>
<StackLayout VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Orientation="Vertical"
Spacing="15">
<ListView ItemsSource="{x:Static local:App.PhoneNumbers}" />
</StackLayout>
</ContentPage.Content>
</ContentPage>
하지만 컴파일시 다음 에러를 발생 시킨다.
Error Failed to resolve assembly: 'Phoneword, Culture=neutral, PublicKeyToken=null' Phoneword.Android
xmlns:local="clr-namespace:Phoneword;assembly=Phoneword" 를 다음으로 변경
xmlns:local="clr-namespace:Phoneword;
자세한건 다음을 참고
http://stackoverflow.com/questions/6253505/xaml-xmlnslocal-c-sharp
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:local="clr-namespace:Phoneword;assembly=Phoneword"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Phoneword.CallHistoryPage">
<ContentPage.Padding>
<OnPlatform x:TypeArguments="Thickness"
iOS="20, 40, 20, 20"
Android="20, 20, 20, 20"
WinPhone="20, 20, 20, 20" />
</ContentPage.Padding>
<ContentPage.Content>
<StackLayout VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Orientation="Vertical"
Spacing="15">
<ListView ItemsSource="{x:Static local:App.PhoneNumbers}" />
</StackLayout>
</ContentPage.Content>
</ContentPage>
Error Failed to resolve assembly: 'Phoneword, Culture=neutral, PublicKeyToken=null' Phoneword.Android
xmlns:local="clr-namespace:Phoneword;assembly=Phoneword" 를 다음으로 변경
xmlns:local="clr-namespace:Phoneword;
자세한건 다음을 참고
http://stackoverflow.com/questions/6253505/xaml-xmlnslocal-c-sharp
댓글 없음:
댓글 쓰기