I am developing a musicplayer Android app from 2 months. I get a Runtime Exception when I add the empty activity to the project, so can anyone help me out?
The code where I am getting and error in application if anyone need any other needeed I will provide here is the error getting message:
AndroidRuntime: FATAL EXCEPTION: main Process: com.example.h3mplayer, PID: 24251
java.lang.RuntimeException: Unable to instantiate application com.example.h3mplayer.ApplicationClass:
java.lang.ClassNotFoundException: Didn't find class "com.example.h3mplayer.ApplicationClass" on path: DexPathList[[zip file "/data/app/~~qxnjd6xNSZQ9V1iIt3P66w==/com.example.h3mplayer-2RfwIgETzNIfDF9WRGuoTQ==/base.apk"],nativeLibraryDirectories=[/data/app/~~qxnjd6xNSZQ9V1iIt3P66w==/com.example.h3mplayer-2RfwIgETzNIfDF9WRGuoTQ==/lib/arm64, /system/lib64, /system/system_ext/lib64]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:1264)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7189)
at android.app.ActivityThread.access$1500(ActivityThread.java:269)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2166)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:257)
at android.app.ActivityThread.main(ActivityThread.java:8218)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:626)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1015)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.h3mplayer.ApplicationClass" on path: DexPathList[[zip file "/data/app/~~qxnjd6xNSZQ9V1iIt3P66w==/com.example.h3mplayer-2RfwIgETzNIfDF9WRGuoTQ==/base.apk"],nativeLibraryDirectories=[/data/app/~~qxnjd6xNSZQ9V1iIt3P66w==/com.example.h3mplayer-2RfwIgETzNIfDF9WRGuoTQ==/lib/arm64, /system/lib64, /system/system_ext/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.AppComponentFactory.instantiateApplication(AppComponentFactory.java:76)
at androidx.core.app.CoreComponentFactory.instantiateApplication(CoreComponentFactory.java:52)
at android.app.Instrumentation.newApplication(Instrumentation.java:1208)
at android.app.LoadedApk.makeApplication(LoadedApk.java:1256)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7189)
at android.app.ActivityThread.access$1500(ActivityThread.java:269)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2166)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:257)
at android.app.ActivityThread.main(ActivityThread.java:8218)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:626)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1015)
After debugging and I seen the message in logcat too.