I am trying to learn Windows Phone dev by creating a basic application that provides information about Pokemon. To do this, I created a portable class library (PokeLib.dll) so that it is compatible with universal applications. I tested this through a project in the same solution ("Test"), and it works great. You can take a look at the code for them on my Github , but as far as I can tell, everything is fine. These two projects are in one solution. To solve the Windows Phone application, I added PokeLib as an "existing project", added links, and wrote a few lines of code to make sure I can call it normal:
MainPage.xaml:
<Grid> <Grid.RowDefinitions> <RowDefinition Height="auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Button Name="GetDataButton" Content="GetData" Click="GetDataButton_Click" Grid.Row="0" HorizontalAlignment="Center"/> <TextBlock Name="DataText" Text="Click to get data" Grid.Row="1" Padding="10"/> </Grid>
MainPage.xaml.cs:
protected override void OnNavigatedTo(NavigationEventArgs e) { p = new Pokemon(1);
When I try to run this on a phone emulator, I get the following message:
. I create the project as "debug" and disabled "Include only my code." I'm not sure what to do under the "Symbols" panel, but I can also add a screenshot if it were useful.
In any case, the application opens, but freezes when I click the GetData button. I expected it to freeze for a moment, since this call is synchronized, but it is constant. However, no errors / exceptions occur. The debugger also does not respond when I try to enter the p.Create () call (probably from the message in the screenshot).
Does anyone have an idea of ββwhat I'm doing wrong? Thank!
Benjin Nov 29 '14 at 18:20 2014-11-29 18:20
source share