'unable to instantiate fragment d.l.b.k.c, could not find Fragment constructor

As you can see it doesn't show exact fragment name so that i can make it clear what is the exact reason. But there is a name of fragment which is "d.l.b.k.c", do you know why this name is like this and how can i solve that

Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.nesib.myapp/myapp.screen.MainActivity}: androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment d.l.b.k.c: could not find Fragment constructor
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3592)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3752)
       at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
       at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2178)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:236)
       at android.app.ActivityThread.main(ActivityThread.java:8051)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:620)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1011)


Solution 1:[1]

First of all the error normally happens when you have a fragment that does not have the default empty constructor. you could check your fragments for that. as for the obfuscating, there is a tool for that.

go to the following directory: $ANDROID_SDK/tools/proguard/bin/. there is a file named proguardgui (the extension is different based on your OS, for Linux is .sh) which requires java to execute. After executing, you get something like this: enter image description here

What you need is the Retrace at the bottom of the list: strong text

to work with it two things are required. mapping file (the path) and the stack trace. which you have.

the mapping file is generated for a make a release build.

p.s. : $ANDROID_SDK is the path where SDK is located

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 mohsen sameti