简体   繁体   English

不幸的是,当单击某些列表视图项时,MyApp已停止工作

[英]Unfortunately MyApp has stop working when some listview item click

I am new in android. 我是android新手。 I have been developing a simple App. 我一直在开发一个简单的应用程序。 I have listview that contain 50 items. 我有包含50个项目的listview。 It's working when i click some top items. 当我单击一些热门商品时,它正在工作。 But when i scroll down the item and click some bottom item, it gives error "unfortunately myapp has stop working". 但是,当我向下滚动该项目并单击某个底部项目时,会出现错误“不幸的是myapp已停止工作”。 I used switch case on listview item click. 我在listview项目单击上使用了开关盒。

can you give me how to solve this problem.? 你能给我如何解决这个问题吗?

Although you havent given us any code or stack trace, hence it is pretty difficult to gauge what you are running into. 尽管您没有给我们提供任何代码或堆栈跟踪,但是很难评估您所遇到的问题。 But you can check whether you have handled for onclick of items after a certain range (When it fails). 但是,您可以检查是否在一定范围后(当失败时)处理了onclick项目。 As you have stated that you are using switch case for the item click. 如前所述,您正在为该项目单击使用开关盒。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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