titanium - TypeError:Ti.App.getArguments 不是函数
问题描述
我在钛鉴赏家工作室的 android 应用程序中使用 Ti.App.getArguments() 但我每次都面临以下错误。获取图像中给出的错误
解决方案
正如您在 API 文档https://docs.appcelerator.com/platform/latest/#!/api/Titanium.App-method-getArguments中看到的那样,该getArguments()
功能仅在 iOS 上可用,并且从您的命令行参数判断您是为安卓编译。Android的解决方案是:
On Android, fetch the Ti.Android.rootActivity object and read its intent property to retrieve the parameters used to launch the application activity.
推荐阅读
- multithreading - 线程在关联时停止,但不拥有,winform 被隐藏
- xml - 使用 XSD 检查 XML
- python-3.x - 通过所有方法安装opencv后无法安装和导入cv2
- python - 如何比较两个 Pandas DataFrame 并显示 DataFrame 2 中的差异
- bash - 使用 sed 删除日志中的日期
- solr - Solr云集群可以做增量备份吗?
- magento2 - 如何在销售订单网格上使用批量操作显示弹出窗口 - Magento 2.2.4
- python - 更改 matplotlib 动画中点的颜色
- python - GoogleCloudStorageToBigQueryOperator source_objects 通过 XCom 接收列表
- java - 创建对象时的 Mockito 来自其他类的私有方法