android fragment 构造函数非public

来源:互联网 发布:java开发工具那个好用 编辑:程序博客网 时间:2024/06/07 09:36

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.yjclw.shop/com.yjclw.shop.activitys.OrderListMangeActivity_}: android.app.Fragment$InstantiationException: Unable to instantiate fragment com.yjclw.shop.fragment.OrderListShowByDateFragment: make sure class name exists, is public, and has an empty constructor that is public


查看代码,竟然发现是private,但是在开发的机子上没有 报错,而在用户的机型上报错了。 三星 galaxy s3. 先改回来public。

0 0
原创粉丝点击