星空网 > 软件开发 > ASP.net

Win10 UWP系列:更新UWP时注意的问题——TargetDeviceFamily

前几天把CurrencyExchanger提交到微软参加Master认证,结果没有通过,反馈了一些错误,看来微软检查还是比较仔细的。

错误主要有:

Visual feedback helps users recognize whether their interactions with your application are detected, interpreted, and handled as they intended.

就是说如果一个列表项点击后没有任何动作的话,不应该有触摸反馈。UWP的ListView项默认会带Tilt效果,以前WP8的时候还要通过另外的Toolkit来实现,现在自带了,反而要想办法去掉。解决办法是自定义ListView的ItemContainerStyle,去掉里面的VisualStateGroup就可以了。

 

再一个错误:

Windows 10 applications should properly navigate back through pages when using the Windows 10 system back button.

在开发的时候主要针对PC和手机来进行了测试,手机有硬件返回键,所以处理了返回键的事件,PC没有返回键,就没做,但PC有一个平板模式,是可以显示返回键的,这个地方也需要处理。解决办法是增加处理SystemNavigationManager.GetForCurrentView().BackRequested事件即可。

 

再一个错误是功能性的,搜索货币时无法正常搜索,经检查代码是搜索内容忘了进行大小写转换,可以搜索小写字母,大写字母就搜不到了,属于粗心错误。统一ToUpper或者ToLower就可以了。

还有一个错误是这样的:

The following recommendation is optional and not required for STARTS compliance. With Windows 10 developers can write a single application that can be installed across a variety of device families including Mobile, Desktop, and XBOX. By default, Windows 10 applications target all device families. In the application manifest, this is called out as the ‘Universal’ Target Device Family. Such applications will be tested against all device form factors where this application may be deployed. Alternatively, developers can limit the device families for which an application can be deployed. For example, if ‘Desktop’ is specified and the Target Device Family, that application can only be installed on PC devices. When published, this application will only be available in the Store running on PCs – it will not be available in the Phone store.

 

The manifest file has Universal as TargetDeviceFamily. The application currently targets only desktop and mobile. It is recommended that the manifest entry is restricted only to supported devices and that a minimum of two device families are supported.

意思是说既然只支持PC和Mobile,就不要把TargetDeviceFamily设置为Universal。我就想当然的在Package.appsmanifest文件里修改了TargetDeviceFamily,设置为只有Desktop和Mobile。

 

还有一个错误:

The application should adapt properly to portrait or landscape view if supported.

这个是因为在635等分辨率低的机型上运行时,部分字体被截断了。而且在横屏的时候计算器界面也没显示完全。所以发布时应尽可能测试不同分辨率机型保持界面可用性。我调整了国旗图标大小,并且只支持竖屏状态,去掉了横屏支持。

 

然后顺手修复了几个小bug,开始上传商店。上传后在分析包的过程中出现以下错误:

XD.UWP.CurrencyExchanger_3.1.3.0_x86_x64_arm_bundle.appxupload28.0 MB

此程序包面向最低版本 10.0.0.0,但其依赖于面向最低版本 10.0.10042.0 的框架 Microsoft.VCLibs.140.00 14.0.22929.0。更新程序包中的最小值以指定 10.0.10042.0 的值或更大的值。

此程序包面向最低版本 10.0.0.0,但其依赖于面向最低版本 10.0.10049.0 的框架 Microsoft.NET.Native.Framework.1.2 1.2.23231.0。更新程序包中的最小值以指定 10.0.10049.0 的值或更大的值。

此程序包面向最低版本 10.0.0.0,但其依赖于面向最低版本 10.0.10049.0 的框架 Microsoft.NET.Native.Runtime.1.1 1.1.23406.0。更新程序包中的最小值以指定 10.0.10049.0 的值或更大的值。
 
该项目是以10586版本开发的, Package.appxmanifest文件中有以下版本号:
<Dependencies>  <TargetDeviceFamily Name="Windows.Mobile" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />  <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" /> </Dependencies>

于是想当然的把MinVersion改为了10.0.10586.0,但是编译时又报错,说MaxVersionTested不能小于Minversion,于是又把MaxVersionTested也改为10586,还是不行。

这就奇怪了,上次上传的时候也没改这个地方啊。看到有说VC++引用版本错误,又重新升级了一下Sqlite组件,结果还是不行。

UWP的打包速度很慢,反复了好几次,不管是分三个包上传还是一个bundle包,都是一样的错误。

反复对比之后,只能怀疑TargetDeviceFamily了,将Mobile和Desktop改回原来的Universal,再上传就成功了。

暂时没找到这是什么原因导致,难道发布过一次Universal后就只能发布Universal了?

如果您也有遇到类似问题欢迎讨论。


 






原标题:Win10 UWP系列:更新UWP时注意的问题——TargetDeviceFamily

关键词:win

win
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

便宜国际货运:https://www.goluckyvip.com/tag/101761.html
泉州联邦国际快递:https://www.goluckyvip.com/tag/101762.html
深圳 国际快递:https://www.goluckyvip.com/tag/101763.html
深圳国际物流快递:https://www.goluckyvip.com/tag/101764.html
海运 国际货运:https://www.goluckyvip.com/tag/101766.html
速递国际:https://www.goluckyvip.com/tag/101767.html
合肥有什么约会的地方好玩的地方 合肥哪里适合情侣好玩的地方:https://www.vstour.cn/a/411237.html
曾家山滑雪场-曾家山滑雪场号码:https://www.vstour.cn/a/411238.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流