Find a crash on Bugly information today: Java. Lang. NoSuchmethodException: could not find fragments constructor.
Can’t find the Fragment constructor? Ctrl + Shift + F (” Unable to instantiate Fragment “) search for Unable to instantiate fragment
Looking back at the stack information on Bugly, I saw a hint that it crashed when the Fragment returned to its saved state. After the original host Activity is destroyed and resumed, its internal Fragment is instantiated by reflection.
The XXXFragment constructor was changed to private, causing the instantiation to fail and an exception to be thrown. Change the no-argument constructor to public.