【问题标题】:Titanium Runtime error : Uncaught Error: Requested module not found: analytics.googleTitanium 运行时错误:未捕获错误:未找到请求的模块:analytics.google
【发布时间】:2018-07-03 13:39:51
【问题描述】:

[ERROR] : TiExceptionHandler: (main) [156,156] ----- Titanium Javascript 运行时错误 ----- [错误] : TiExceptionHandler: (main) [0,156] - 在 ti:/module.js:303,2 [错误]:TiExceptionHandler:(主)[0,156] - 消息:未捕获的错误:未找到请求的模块:analytics.google [错误] : TiExceptionHandler: (main) [0,156] - 来源: throw new Error('Requested module not found: ' + request); // TODO 将“code”属性设置为“MODULE_NOT_FOUND”以匹配节点? [错误]:V8Exception:ti:/module.js:303 发生异常:未捕获错误:未找到请求的模块:analytics.google

在 Android 模拟器上运行时出现上述错误。我正在使用 Ti SDK 7.0.0 并在 API 级别 23 模拟器上运行。 我什至从 TiApp.xml 中删除了 analytics.google 模块,但仍然出现同样的错误。

有什么解决办法吗?

【问题讨论】:

    标签: javascript titanium appcelerator-titanium titanium-modules


    【解决方案1】:

    analytics.google 是您的应用程序中包含(或未包含)的模块。如果“我删除它”是指您已将其从 tiapp.xml 中排除,那么您也应该将其从代码中删除。

    你的代码中应该有require('analytics.google')

    另外...从 TiSDK 7.0.0.GA 开始必须重新编译模块。查看repository 看起来它已经2 年没有更新了。您可以使用this guide 自行更新模块或移至better updated module

    编辑:我看到该模块已在 PR 中更新。你也可以改用that build

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-11-24
      • 2015-11-22
      • 2018-12-01
      • 1970-01-01
      • 2022-10-25
      • 2022-08-13
      • 2017-05-18
      • 1970-01-01
      相关资源
      最近更新 更多