无法通过 cordova 应用程序加载器在 cordova android 上加载 ExtJS:addRow 未定义

Unable to load ExtJS on cordova android through cordova app loader : addRow is not defined

我正在尝试做的故事的较短版本:通过 cordova app loader. 在 cordova 运行时加载 Web 应用程序 该网络应用程序基于 ExtJS

进程

  1. 正在构建 ExtJS 应用程序。
  2. bootstrap.js 正在为微型加载器概念生成。
  3. manifest.json生成
  4. Cordova 应用程序能够下载和加载外部 Web 应用程序。

在 android 和 iOS 上尝试时,iOS 版本运行良好,但 android 版本会抛出几个错误。

(index):1 Uncaught ReferenceError: start is not defined
    at (index):1
(index):2 Uncaught ReferenceError: onHasParentDirectory is not defined
    at (index):2
(index):3 Uncaught ReferenceError: addRow is not defined
    at (index):3
(index):4 Uncaught ReferenceError: addRow is not defined
    at (index):4
(index):5 Uncaught ReferenceError: addRow is not defined
    at (index):5
(index):6 Uncaught ReferenceError: addRow is not defined
    at (index):6
(index):7 Uncaught ReferenceError: addRow is not defined
    at (index):7
(index):8 Uncaught ReferenceError: addRow is not defined
    at (index):8

经进一步检查,这似乎与 webview 在 android 中的工作方式以及它在 Hashes 方面的问题有关。

links 的一些回复: - 问题是由于 link (href) 前缀为“/#/xxxx”而不是“#/xxxx”… -file:///android_asset/www/main.html#" + strippedUrl; 其中 strippedUrl 表示原始 url file:/// 转换为 just / 并可能 /android_asset/www 转换到一个空字符串,在 4.0 Webview 中似乎存在与 html5 路由和以 /.

开头的路径相关的问题

参考链接:

https://gist.github.com/morganrallen/f955cc0312ae2cdbe9a5 https://forum.ionicframework.com/t/uncaught-referenceerror-addrow-is-not-defined/9266/3

为了尝试这种方法,我尝试实施 hashbang 方法,但应用程序在 android 中仍然失败。

任何人都可以告诉我如何解决这些错误或者有什么可能的解决方案。

P.S :如果我在 ExtJS 中没有路由的情况下工作,应用程序可以完美运行。错误不在 ExtJS 项目中。

感谢和问候

我通过指定带有 index.html 的路径解决了这个问题。

早些时候是

downloadedAppUrl = fileSystem.root.nativeURL + 'app';

现在我指定了

downloadedAppUrl = fileSystem.root.nativeURL + 'app/index.html';