aykuttasil / CallRecorder

Android Phone Call Recorder
MIT License
761 stars 238 forks source link

Fatal exception: unable to instantiate activity ComponentInfo #55

Open numitec opened 4 years ago

numitec commented 4 years ago

Hello there,

newer user: I download it and try to run it on Android Studio 3.5.3 on device Nexus 5X API 27; debugging session throws:

E/AndroidRuntime: FATAL EXCEPTION: main Process: com.aykuttasil.callrecorder, PID: 4061 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.aykuttasil.callrecorder/com.aykuttasil.callrecorder.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.aykuttasil.callrecorder.MainActivity" on path: DexPathList[[zip file "/data/app/com.aykuttasil.callrecorder-w8x8a4wYMlwMLz0aRYjCOA==/base.apk"],nativeLibraryDirectories=[/data/app/com.aykuttasil.callrecorder-w8x8a4wYMlwMLz0aRYjCOA==/lib/x86, /system/lib, /vendor/lib]] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2679) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6494) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.aykuttasil.callrecorder.MainActivity" on path: DexPathList[[zip file "/data/app/com.aykuttasil.callrecorder-w8x8a4wYMlwMLz0aRYjCOA==/base.apk"],nativeLibraryDirectories=[/data/app/com.aykuttasil.callrecorder-w8x8a4wYMlwMLz0aRYjCOA==/lib/x86, /system/lib, /vendor/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125) at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) at android.app.Instrumentation.newActivity(Instrumentation.java:1174) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2669) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)  at android.app.ActivityThread.-wrap11(Unknown Source:0)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)  at android.os.Handler.dispatchMessage(Handler.java:106)  at android.os.Looper.loop(Looper.java:164)  at android.app.ActivityThread.main(ActivityThread.java:6494)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)  Disconnected from the target VM, address: 'localhost:8600', transport: 'socket'

Kindly where I can start to find a workaround?

Thank you,

S.

satti8893 commented 3 years ago

apply plugin: 'kotlin-android'

Add above line in build.gradle

josephantonyk94 commented 2 years ago

it may happen if the import of package name in main activity is misplaced