Renamed classes in the project, was refactored. Then launching the project began to receive an error:

Error:Error converting bytecode to dex: Cause: java.lang.RuntimeException: Exception parsing classes 

Renamed the classes back as they were, refactoring was performed. Now the application does not start, but with another error.

 FATAL EXCEPTION: main java.lang.RuntimeException: Unable to instantiate application com.android.tools.fd.runtime.BootstrapApplication: java.lang.ClassNotFoundException: com.android.tools.fd.runtime.BootstrapApplication at android.app.LoadedApk.makeApplication(LoadedApk.java:501) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4123) at android.app.ActivityThread.access$1300(ActivityThread.java:134) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1259) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4744) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.ClassNotFoundException: com.android.tools.fd.runtime.BootstrapApplication at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61) at java.lang.ClassLoader.loadClass(ClassLoader.java:501) at java.lang.ClassLoader.loadClass(ClassLoader.java:461) at android.app.Instrumentation.newApplication(Instrumentation.java:967) at android.app.LoadedApk.makeApplication(LoadedApk.java:496) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4123) at android.app.ActivityThread.access$1300(ActivityThread.java:134) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1259) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4744) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) at dalvik.system.NativeStart.main(Native Method) 

Help solve the problem, knowledge is not enough to solve it. And so and so the error occurs

  • Lost class com.android.tools.fd.runtime.BootstrapApplication . See if you have such a class in the package. Is it imported at all? - DimXenon
  • The main class in the main class file look as it is called. Maybe the names do not match. You renamed the files, but didn't forget their contents? - DimXenon
  • The class is not imported anywhere. If I understood correctly where to look, then in the folder app \ src \ main \ java \ com \ example \ myapplication where all classes are contained. The names always match the same, because now even if I rename them back, another error completely arises ((I killed the kursych called. Now I have created a new project and are trying to copy everything there, I hope it will help. - ROBIT78
  • Check files for their names (files) with the class names described in them. - DimXenon
  • In general, it did not work out anything, but tritely made another project and re-copied all the classes and activations. It all worked. An old project I forget as a nightmare. Thank you very much for responding anyway!) - ROBIT78

1 answer 1

You can try the rebuild project , if it doesn't help, try disabling Instant Run
Settings -> Build, Execution, Deployment -> Instant Run Uncheck the first tick

  • Tried, did not help. By the way, the new project created everything there and copied and earned. Is there a sense of an instant wound back tick? Or let it remain for the future? - ROBIT78
  • No, in some cases it helps to avoid problems associated with database libraries. How realm, sugar - Herrgott