开发者

how to remove warning ".productAdapter" is never read locally?

开发者 https://www.devze.com 2023-03-15 05:00 出处:网络
I am very new in android Development. I am getting a warning when i build my project. waring is: The field SavedSalesHistoryList.productAdapter is 开发者_如何转开发never read locally.

I am very new in android Development. I am getting a warning when i build my project. waring is:

The field SavedSalesHistoryList.productAdapter is 开发者_如何转开发never read locally.

Can any one help me?

Thanx in advance


It means you never actually used that item. You can safely delete or comment it's declaration out. You're wasting CPU cycles allocating memory to it and never using it, then letting it get garbage collected (if an object). Granted, small things like this wont impact the performance of EVERY project, but it makes for cleaner code.


It should mean that a private variable, productAdapter in your case, is not being used. You can safely delete it from the SavedSalesHistoryList class.

0

精彩评论

暂无评论...
验证码 换一张
取 消