Caused by: java.lang.InstantiationException: can't instantiate class报错记录

E/AndroidRuntime(15377): Caused by: java.lang.InstantiationException: can't instantiate class com.*.*.FriendsActivity; no empty constructor

在用fragment做跳转的时候出现的错误记录解决办法:是因为该Fragment没有使用空参的构造函数,补上--

public FriendsActivity()

{

       super();

}

猜你喜欢

转载自blog.csdn.net/huangrangg12/article/details/18985865