Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Installation of the application failed. Run time error has eccured. Fix the capabilities in WMAppManifest.xml file."

I was building this simple application for WP8. Everything was working fine until today I had to add a new capability to the manifest file to allow access to sensors. I just used graphical editor to tick ID_CAP_SENSORS. Now every time I try to deploy my app I get:

Installation of the application failed. Run time error has eccured. Fix the capabilities in WMAppManifest.xml file.

Here is my whole manifest 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>

My manifest file seems ok to me. I have no idea how to debug that. Compiler is not even showing were exactly I have the problem. I will be very glad for any hint.

like image 369
Booyaches Avatar asked Mar 12 '13 21:03

Booyaches


2 Answers

The HTC 8S doesn't have a gyroscope (I've just tried one). That is the error you get if you specify:

<Requirements>
  <Requirement Name="ID_REQ_GYROSCOPE" />
</Requirements> 

and try running the app on a dev phone without a gyroscope.

Of course the App Store would hide any such apps so the HTC 8S wouldn't be able to download them.

like image 191
Paul Annetts Avatar answered Nov 08 '22 01:11

Paul Annetts


Wow! After having wasted some time trying to solve this problem I eventually solved it by just keeping only those capabilities which I am actually using, no less, no more! In my case I only needed internet permission so here is how the capabilities part of my WMAppManifest.xml looks now

<Capabilities>
      <Capability Name="ID_CAP_NETWORKING" />
</Capabilities>
like image 1
Atul Goyal Avatar answered Nov 08 '22 01:11

Atul Goyal