我正在使用Cordova构建一个包含Ext.js Web应用程序的UWP Windows 10应用程序。 我可以成功地使用Cordova和Sencha的系统构建应用程序,输出位于cordova\platforms\windows\AppPackages文件夹中的.appx文件,并在信任生成的密钥后安装它。但是,如果在安装完成后勾选“运行完成时运行”复选框,则关闭应用程序并从开始菜单重新打开应用程序时,只会显示黑屏(实际颜色为#1d1f20),卸载再重新安装才能正常工作。 如果将“运行完成时运行”复选框取消选中,然后手动打开应用程序,我也会看到黑屏。当黑屏出现时,按F12打开开发人员工具,然后按Ctrl和R重新加载,就会看到登录屏幕,但没有控制台错误。我尝试添加与闪屏相关的config到config.xml文件,但这并没有帮助解决问题。在Visual Studio中运行本机计算机上的解决方案并可视化构建工具创建app包后,即使在后续启动时,该应用程序也会正常工作,但通过Project > Store > Create App Packages创建的appxbundle文件会出现同样的黑屏问题。我的系统详细信息如下:Windows 10 x64版本1709 OS Build 16299.192,Node: 6.10.3,npm: 5.6.0,cordova: 8.0.0,Visual Studio: Community 2017 15.5.3,JavaScript UWP Project System: 2.0,Visual Studio tools for Universal Windows Apps: 15.0.27130.2020,Ext.js 6.5.1。
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.foo.foomobile" version="1.0.5" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>FooMobile</name>
<description>
A sample Apache Cordova application that responds to the deviceready event.
</description>
<author email="dev@cordova.apache.org" href="http://cordova.io">
Foo Services
</author>
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
<plugin name="cordova-plugin-whitelist" spec="1" />
<preference name="windows-target-version" value="10.0" />
<preference name="KeepRunning" value="true" />
<engine name="android" spec="~6.2.3" />
<engine name="windows" spec="^5.0.0" />
</widget>
任何帮助都将不胜感激。
编辑
我尝试了使用空白的 Ext.js 6.5.3 应用程序进行 Cordova 构建,结果在第一次启动正常工作,但在随后的启动中出现了白屏问题。
编辑2
sencha app build native
或cordova build windows
命令重新构建该文件。 - Daniel Twigg