Android 应用加速器钛安卓崩溃
在android中(再次)我收到以下错误,当我进入屏幕时,应用程序停止工作:Android 应用加速器钛安卓崩溃,android,titanium,titanium-mobile,appcelerator-titanium,titanium-android,Android,Titanium,Titanium Mobile,Appcelerator Titanium,Titanium Android,在android中(再次)我收到以下错误,当我进入屏幕时,应用程序停止工作: [ERROR] : TiApplication: (main) [629,72636] Sending event: exception on thread: main msg:java.lang.ClassCastException: java.lang.Object[] cannot be cast to org.appcelerator.titanium.proxy.TiViewProxy; Titanium
[ERROR] : TiApplication: (main) [629,72636] Sending event: exception on thread: main msg:java.lang.ClassCastException: java.lang.Object[] cannot be cast to org.appcelerator.titanium.proxy.TiViewProxy; Titanium 6.0.1,2016/12/19 16:51,undefined
[ERROR] : TiApplication: java.lang.ClassCastException: java.lang.Object[] cannot be cast to org.appcelerator.titanium.proxy.TiViewProxy
[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:237)
[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:98)
[ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:148)
[ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5417)
[ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Native Method)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
[ERROR] : D/ ( 691): HostConnection::get() New Host Connection established 0xdd0a53a0, tid 3809
[INFO] : Process: Sending signal. PID: 3733 SIG: 9
[INFO] : D/ ( 3814): HostConnection::get() New Host Connection established 0xee930780, tid 3814
[INFO] : D/ ( 3814): HostConnection::get() New Host Connection established 0xf3d7c940, tid 3852
我不知道错误消息是什么意思,为什么我会收到“HostConnection::get()新主机连接已建立0xf3d7c940,tid 3852”
添加的详细信息:
在我的代码中,我有如下内容:
<Alloy>
<Window>
<Require type="view" id="dashboard_center" src="mydashboard/myprofile" />
</Window>
</Alloy>
上次更新…
当我尝试向视图添加对象(在ios上工作)但在android上失败时,我的问题似乎来自这个循环,有什么帮助吗
var s = [];
var star_style = $.createStyle({
classes : 'star'
});
for (var i = 0; i < total_notes; i++) {
var star = Ti.UI.createImageView({
image : 'images/stars.png',
classes : ["star"],
});
star.applyProperties(star_style);
s.push(star);
}
$.stars_container.add(s);
var s=[];
var star_style=$.createStyle({
课程:“明星”
});
对于(变量i=0;i
当我注释最后一行($.stars\u container.add)时,崩溃消失了。
感谢您的帮助。这与方法
someView.addView(something)代码>其中某物表示不是Ti.UI元素
尝试验证添加到Ti.UI.View
中的所有内容都是另一个Ti.UI
组件 似乎您正在尝试将对象用作Ti.UI.View
component是否使用liveview?您好,谢谢您的评论,我没有使用liveview,您所说的“似乎您正在尝试将对象用作Ti.UI.View组件”是什么意思?我更新了我的问题以了解更多细节,我注意到我的应用程序在ios上运行良好。
var s = [];
var star_style = $.createStyle({
classes : 'star'
});
for (var i = 0; i < total_notes; i++) {
var star = Ti.UI.createImageView({
image : 'images/stars.png',
classes : ["star"],
});
star.applyProperties(star_style);
s.push(star);
}
$.stars_container.add(s);