根据documentation,当应用程序需要以编程方式访问某些用户资源(例如视频库)时,必须声明功能。
This page of the documentation还声明:All Windows Phone capabilities are not available for apps being developed specifically for Windows 10 Insider Preview
。
我正在为Windows 10构建通用Windows应用程序,我想在package.appmanifest文件中注册访问视频库的功能。但是,当我这样做时,我收到一个错误:
The 'Name' attribute is invalid - The value 'videosLibrary' is invalid according to its datatype 'http://schemas.microsoft.com/appx/manifest/types:ST_Capability_Foundation'
不幸的是,如果我按照错误消息中的链接,页面只会显示:
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
以下是代码的屏幕截图(请注意其他功能正常工作):
目前无法为正在为Windows 10开发的应用程序注册功能,还是我遗漏了一些明显的东西?
答案 0 :(得分:0)
我找到了答案here。
基本上你需要使用
<uap:Capability Name="VideosLibrary" />
而不是
<Capability Name="VideosLibrary" />
。