c# – “安装应用程序失败.运行时错误已经过了.修复WMAppManifest.xml文件中的功能.“

前端之家收集整理的这篇文章主要介绍了c# – “安装应用程序失败.运行时错误已经过了.修复WMAppManifest.xml文件中的功能.“前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在为WP8构建这个简单的应用程序.一切都工作正常,直到今天我必须为清单文件添加功能,以允许访问传感器.我只是使用图形编辑器来勾选ID_CAP_SENSORS.现在每次我尝试部署我的应用程序时,我得到:
Installation of the application Failed. Run time error has eccured. Fix the capabilities in WMAppManifest.xml file.

这是我的整个清单文件:@H_403_5@

<?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>

我的清单文件对我来说似乎没问题.我不知道如何调试.编译器甚至没有显示我确实有问题.任何提示我都会很高兴.@H_403_5@

解决方法

HTC 8S没有陀螺仪(我刚试过一台).这是您指定的错误
<Requirements>
  <Requirement Name="ID_REQ_GYROSCOPE" />
</Requirements>

并尝试在没有陀螺仪的开机手机上运行应用程序.@H_403_5@

当然,App Store会隐藏任何此类应用程序,因此HTC 8S将无法下载它们.@H_403_5@

猜你在找的C#相关文章