首页 > 解决方案 > TypeError:Ti.App.getArguments 不是函数

问题描述

我在钛鉴赏家工作室的 android 应用程序中使用 Ti.App.getArguments() 但我每次都面临以下错误。获取图像中给出的错误

标签: titaniumappcelerator

解决方案


正如您在 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.


推荐阅读