简体   繁体   中英

Android tableview crashing on titanium Appcelerator SDK 7.5.0

I am getting the following error only on Android when I click on table view which has a custom table row. Can someone please help me understand this?

TiExceptionHandler: (main) [5645,45992] Attempt to invoke virtual met hod 'void org.appcelerator.titanium.view.TiUIView.registerForTouch()' on a null object reference [ERROR] : TiExceptionHandler: [ERROR] : TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.h andleGetView(TiViewProxy.java:594) [ERROR] : TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.h andleMessage(TiViewProxy.java:270) [ERROR] : TiExceptionHandler: android.os.Handler.dispatchMessage(Handler.ja va:102) [ERROR] : TiExceptionHandler: android.os.Looper.loop(Looper.java:193) [ERROR] : TiExceptionHandler: android.app.ActivityThread.main(ActivityThrea d.java:6669) [ERROR] : TiExceptionHandler: java.lang.reflect.Method.invoke(Native Method ) [ERROR] : TiExceptionHandler: com.android.internal.os.RuntimeInit$MethodAnd ArgsCaller.run(RuntimeInit.java:493) [ERROR] : TiExceptionHandler: com.android.internal.os.ZygoteInit.main(Zygot eInit.java:858)

OK i just removed the console.log(JSON.stringify(e)); in code and it worked.

UI View and UITableView are Classes that belongs to Apple iOS SDK, so those objects can never be Instantiated with Android, I am impress that Titanium didn't detect the wrong compatibility.

In android you should use ListView or RecyclerView, the most similar name object that Android contains is TableLayout but is barely used.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM