我正在为 WP8 构建这个简单的应用程序。一切正常,直到今天我不得不在清单文件中添加一个新功能以允许访问传感器。我只是用图形编辑器打勾ID_CAP_SENSORS
。现在每次我尝试部署我的应用程序时,我都会得到:
Installation of the application failed. Run time error has eccured. Fix the capabilities in WMAppManifest.xml file.
这是我的整个清单文件:
<?xml version="1.0" encoding="utf-8"?>
<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2012/deployment" AppPlatformVersion="8.0">
<DefaultLanguage xmlns="" code="en-US" />
<App xmlns="" ProductID="{445cf5dd-14ec-4542-a44b-3d5600c1a6e5}" Title="BitCoinTile" RuntimeType="Silverlight" Version="1.0.0.1" Genre="apps.normal" Author="Wiktor Zdziechowski" Description="This very simple application helps you to keep track of BitCoin price." Publisher="XXX" PublisherID="{38b628a8-f9ec-4f05-a22e-5eba9ffe686e}">
<IconPath IsRelative="true" IsResource="false">Assets\Tiles\FlipCycleTileMedium.png</IconPath>
<Capabilities>
<Capability Name="ID_CAP_NETWORKING" />
<Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
<Capability Name="ID_CAP_SENSORS" />
</Capabilities>
<Tasks>
<DefaultTask Name="_default" NavigationPage="MainPage.xaml" />
</Tasks>
<Tokens>
<PrimaryToken TokenID="BitCoinTailToken" TaskName="_default">
<TemplateFlip>
<SmallImageURI IsRelative="true" IsResource="false">Assets\Tiles\FlipCycleTileMedium.png</SmallImageURI>
<Count>0</Count>
<BackgroundImageURI IsRelative="true" IsResource="false">Assets\Tiles\FlipCycleTileMedium.png</BackgroundImageURI>
<Title>BitCoinTile</Title>
<BackContent>
</BackContent>
<BackBackgroundImageURI>
</BackBackgroundImageURI>
<BackTitle>
</BackTitle>
<DeviceLockImageURI>
</DeviceLockImageURI>
<HasLarge>
</HasLarge>
</TemplateFlip>
</PrimaryToken>
</Tokens>
<Extensions>
<Extension ExtensionName="LockScreen_Notification_TextField" ConsumerID="{111DFF24-AA15-4A96-8006-2BFF8122084F}" TaskID="_default" />
</Extensions>
<ScreenResolutions>
<ScreenResolution Name="ID_RESOLUTION_WVGA" />
<ScreenResolution Name="ID_RESOLUTION_WXGA" />
<ScreenResolution Name="ID_RESOLUTION_HD720P" />
</ScreenResolutions>
<Requirements>
<Requirement Name="ID_REQ_GYROSCOPE" />
</Requirements>
</App>
</Deployment>
我的清单文件对我来说似乎没问题。我不知道如何调试它。编译器甚至没有显示正是我有问题。我会很高兴任何提示。