Sergey Grebnov created CB-5350:
----------------------------------

             Summary: Windows8 build fails due to invalid 'Capabilities' 
definition
                 Key: CB-5350
                 URL: https://issues.apache.org/jira/browse/CB-5350
             Project: Apache Cordova
          Issue Type: Bug
          Components: CLI, Windows 8
         Environment: Windows8
            Reporter: Sergey Grebnov
            Assignee: Sergey Grebnov


1. Add the following plugins to the project: org.apache.cordova.geolocation, 
org.apache.cordova.camera
2. Execute build for windows8 platform.
3. The following error occurs during build
  C:\..\mobilespec\platforms\windows8\bin\Debug\AppxManifest.xml(34,6): error 
APPX1404: File content does not conform to specified schema. The element 
'Capabilities' in namespace 'http://schemas.microsoft.com/appx/2010/manifest' 
has invalid child element 'Capability' in namespace 
'http://schemas.microsoft.com/appx/2010/manifest'. List of possible elements 
expected: 'DeviceCapability' in namespace 
'http://schemas.microsoft.com/appx/2010/manifest'. 
[C:\...\mobilespec\platforms\windows8\CordovaApp.jsproj]

Same error if open generated project in Visual Studio.

AppxManifest.xml contains the following block

<Capabilities>
    <Capability Name="internetClient" />
    <DeviceCapability Name="location" />
    <Capability Name="picturesLibrary" />
    <DeviceCapability Name="webcam" />
  </Capabilities>

But as per manifest scheme definition all Capability elements must go before 
DeviceCapability 
(http://msdn.microsoft.com/en-us/library/windows/apps/br211422.aspx) . So it 
should be
<Capabilities>
    <Capability Name="internetClient" />
    <Capability Name="picturesLibrary" />
    <DeviceCapability Name="location" />
    <DeviceCapability Name="webcam" />
  </Capabilities>
It seems we should manually sort Capabilities child element after they are 
merged from plugins definition.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to