2014-09-26 82 views
0

,當我在我的VS 2013中創建新的通用應用程序(集線器模板),並遵循有關添加Bing地圖,以我的應用程序的這篇文章: http://msdn.microsoft.com/en-us/library/hh855146.aspxWindows應用商店的應用程序崩潰添加Bing地圖頁面

我的XAML:

<Page 
x:Name="pageRoot" 
x:Class="HubApp1.HubPage" 
DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}" 
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
xmlns:local="using:HubApp1" 
xmlns:data="using:HubApp1.Data" 
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
xmlns:bm="using:Bing.Maps" 
mc:Ignorable="d"> 

<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> 
    <bm:Map x:Name="myMap" Credentials="MY_SHARD_KEY" ></bm:Map> 
</Grid> 

上推出的應用程序crashs本機異常:

Unhandled exception at 0x76ECB152 (combase.dll) in HubApp1.Windows.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x002ED480, 0x00000002). 

沒有Bing Maps控件當然應用程序不會崩潰... 任何人都知道什麼問題?我只想做簡單的事情。

回答

0

必應地圖控件僅適用於Windows 8/8.1應用程序。要在通用應用程序中使用地圖,請閱讀以下博客文章:http://rbrundritt.wordpress.com/2014/06/24/how-to-make-use-of-maps-in-universal-apps/

另一件要檢查的問題是,您已將配置管理器中的活動解決方案平臺從Any-CPU更改爲x86或x64。 Bing Maps控件使用C++運行時,並且需要您針對特定平臺構建項目,而不是使用Any-CPU設置。你可以在這裏找到這方面的文檔:http://msdn.microsoft.com/en-us/library/dn456475.aspx

相關問題