gpt4 book ai didi

android - 钛锻造UI : application crashing with no apparent reason

转载 作者:搜寻专家 更新时间:2023-11-01 09:10:22 26 4
gpt4 key购买 nike

我一直在测试用于 Titanium 的新 ForgedUI 附加组件,它有助于为 Titanium 应用程序创建 UI 元素。

我创建了 UI 并将其构建为 JS 代码。它现在看起来像 this ,而且 app.js 看起来像 this

但是,当我为我的设备构建应用程序时,出现以下错误:

`12-29 10:28:54.745: E/TiAPI(20029): --------added
12-29 10:28:54.764: E/TiAPI(20029): --------window created
12-29 10:28:54.764: E/TiAPI(20029): -------logo created
12-29 10:28:54.768: E/TiAPI(20029): -------searchbar created
12-29 10:28:54.772: E/TiAPI(20029): -------BT1 created
12-29 10:28:54.776: E/TiAPI(20029): -------BTN2 created
12-29 10:28:54.776: E/TiAPI(20029): ------- appSTUDIO logo created
12-29 10:28:54.780: E/TiAPI(20029): -------Bug report pic created
12-29 10:28:54.780: E/TiAPI(20029): ---------window created
12-29 10:28:55.128: E/TiApplication(20029): (main) [14,192] Sending event: exception on thread: main msg:java.lang.NumberFormatException: Unable to convert java.lang.Boolean; Titanium 1.8.0.1,2011/12/22 13:09,fbdc96f
12-29 10:28:55.128: E/TiApplication(20029): java.lang.NumberFormatException: Unable to convert java.lang.Boolean
12-29 10:28:55.128: E/TiApplication(20029): at org.appcelerator.titanium.util.TiConvert.toInt(TiConvert.java:307)
12-29 10:28:55.128: E/TiApplication(20029): at org.appcelerator.titanium.util.TiConvert.toInt(TiConvert.java:313)
12-29 10:28:55.128: E/TiApplication(20029): at ti.modules.titanium.ui.widget.TiUIText.handleKeyboard(TiUIText.java:297)
12-29 10:28:55.128: E/TiApplication(20029): at ti.modules.titanium.ui.widget.TiUIText.processProperties(TiUIText.java:145)
12-29 10:28:55.128: E/TiApplication(20029): at ti.modules.titanium.ui.widget.searchbar.TiUISearchBar.processProperties(TiUISearchBar.java:93)
12-29 10:28:55.128: E/TiApplication(20029): at org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:641)
12-29 10:28:55.128: E/TiApplication(20029): at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:449)
12-29 10:28:55.128: E/TiApplication(20029): at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:441)
12-29 10:28:55.128: E/TiApplication(20029): at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:427)
12-29 10:28:55.128: E/TiApplication(20029): at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:456)
12-29 10:28:55.128: E/TiApplication(20029): at ti.modules.titanium.ui.ActivityWindowProxy.handleMessage(ActivityWindowProxy.java:81)
12-29 10:28:55.128: E/TiApplication(20029): at android.os.Handler.dispatchMessage(Handler.java:95)
12-29 10:28:55.128: E/TiApplication(20029): at android.os.Looper.loop(Looper.java:123)
12-29 10:28:55.128: E/TiApplication(20029): at android.app.ActivityThread.main(ActivityThread.java:3687)
12-29 10:28:55.128: E/TiApplication(20029): at java.lang.reflect.Method.invokeNative(Native Method)
12-29 10:28:55.128: E/TiApplication(20029): at java.lang.reflect.Method.invoke(Method.java:507)
12-29 10:28:55.128: E/TiApplication(20029): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
12-29 10:28:55.128: E/TiApplication(20029): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
12-29 10:28:55.128: E/TiApplication(20029): at dalvik.system.NativeStart.main(Native Method)
12-29 10:28:55.174: E/AndroidRuntime(20029): FATAL EXCEPTION: main
12-29 10:28:55.174: E/AndroidRuntime(20029): java.lang.NumberFormatException: Unable to convert java.lang.Boolean
12-29 10:28:55.174: E/AndroidRuntime(20029): at org.appcelerator.titanium.util.TiConvert.toInt(TiConvert.java:307)
12-29 10:28:55.174: E/AndroidRuntime(20029): at org.appcelerator.titanium.util.TiConvert.toInt(TiConvert.java:313)
12-29 10:28:55.174: E/AndroidRuntime(20029): at ti.modules.titanium.ui.widget.TiUIText.handleKeyboard(TiUIText.java:297)
12-29 10:28:55.174: E/AndroidRuntime(20029): at ti.modules.titanium.ui.widget.TiUIText.processProperties(TiUIText.java:145)
12-29 10:28:55.174: E/AndroidRuntime(20029): at ti.modules.titanium.ui.widget.searchbar.TiUISearchBar.processProperties(TiUISearchBar.java:93)
12-29 10:28:55.174: E/AndroidRuntime(20029): at org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:641)
12-29 10:28:55.174: E/AndroidRuntime(20029): at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:449)
12-29 10:28:55.174: E/AndroidRuntime(20029): at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:441)
12-29 10:28:55.174: E/AndroidRuntime(20029): at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:427)
12-29 10:28:55.174: E/AndroidRuntime(20029): at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:456)
12-29 10:28:55.174: E/AndroidRuntime(20029): at ti.modules.titanium.ui.ActivityWindowProxy.handleMessage(ActivityWindowProxy.java:81)
12-29 10:28:55.174: E/AndroidRuntime(20029): at android.os.Handler.dispatchMessage(Handler.java:95)
12-29 10:28:55.174: E/AndroidRuntime(20029): at android.os.Looper.loop(Looper.java:123)
12-29 10:28:55.174: E/AndroidRuntime(20029): at android.app.ActivityThread.main(ActivityThread.java:3687)
12-29 10:28:55.174: E/AndroidRuntime(20029): at java.lang.reflect.Method.invokeNative(Native Method)
12-29 10:28:55.174: E/AndroidRuntime(20029): at java.lang.reflect.Method.invoke(Method.java:507)
12-29 10:28:55.174: E/AndroidRuntime(20029): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
12-29 10:28:55.174: E/AndroidRuntime(20029): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
12-29 10:28:55.174: E/AndroidRuntime(20029): at dalvik.system.NativeStart.main(Native Method)
12-29 10:28:55.182: E/(482): Dumpstate > /data/log/dumpstate_app_error

`

谢谢大家...

最佳答案

我遇到了同样的问题,导致了同样的、看似错误的自动资本化行为。

进一步研究发现自动大写似乎不应该包含 true 或 false 值(它在 iOS 中工作得很好,但在 Android 中不行)。相反,它应该包含此处定义的常量值:

autocapitalization constants

对于自动更正,似乎我们可以将其设置为 true 或 false。我现在在 Android 和 iOS 上工作的文本字段中有以下几行,没有任何问题:

autocaptalization: Ti.UI.TEXT_AUTOCAPITALIZATION_NONE,
autocorrect: false,

关于android - 钛锻造UI : application crashing with no apparent reason,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8666864/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com