https://kotlinlang.org logo
#android
Title
# android
m

Mauricio Hernandez

05/27/2020, 5:21 PM
Hello @everyone,When taking a photo on a Samsung I get the following error :
Copy code
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.securitas.aviation.satt/com.auxo.satt.main.MainActivity}: androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment com.auxo.satt.main.fragment.MainFragment: could not find Fragment constructor
s

Steve

05/27/2020, 6:43 PM
Your issue is that you don't have a Fragment constructor specified. You need to have an empty constructor specified for a Fragment
Also, I would probably avoid naming something "MainFragment", as that doesn't really describe what the Fragment does
2 Views