In android (again) i received following error and app stops working when i go to a screen :
[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
I don't know what the error message means, why i receive "HostConnection::get() New Host Connection established 0xf3d7c940, tid 3852" ?
DETAILS ADDED : On my code i have something like this :
<Alloy>
<Window>
<Require type="view" id="dashboard_center" src="mydashboard/myprofile" />
</Window>
</Alloy>
And in my profile controller i have somewhere :
.... FROM REMOTE ...
_.each(response, function(mission, key, obj) {
$.block.add(Alloy.createController("common/user_profile", obj[i]).getView());
i++;});
LAST UPDATE ...
I seems my issue is from this loop when i try to add an object to a view (working on ios), but fails on android, any help ? :
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);
When i comment the last line ($.stars_container.add(s)), the crash go away. Thanks for help.