我在 Play Store 上发布了一个应用程序,我正在使用 ACRA 接收崩溃报告。我收到了很多下面列出的这些崩溃报告,尽管我在很多设备上对应用程序进行了很多测试,但我以前从未见过。
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.app/com.example.app.MainActivity}: android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment com.example.app.fragments.InfoDetailFragment$1: make sure class name exists, is public, and has an empty constructor that is public
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2355)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2391)
at android.app.ActivityThread.access$600(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1335)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:155)
at android.app.ActivityThread.main(ActivityThread.java:5520)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1029)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:796)
at dalvik.system.NativeStart.main(Native Method)
它始终是片段“InfoDetailFragment”,就像我的所有片段一样,它是 BaseFragment 的子类。
public static InfoDetailFragment createInstance(String title) {
InfoDetailFragment frag = new InfoDetailFragment();
Bundle args = new Bundle();
args.putString(ARGS_TITLE, title);
frag.setArguments(args);
return frag;
}
public InfoDetailFragment() {
super("InfoDetailFragment");
}
我所有的片段都实例化完全相同,但错误只出现在这个片段上。有什么想法或提示吗?非常感谢