When i launch app it getting me this error
FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: com.android.tools.fd.runtime.AppInfo
at com.android.tools.fd.runtime.BootstrapApplication.attachBaseContext(BootstrapApplication.java:229)
at android.app.Application.attach(Application.java:181)
at android.app.Instrumentation.newApplication(Instrumentation.java:991)
at android.app.Instrumentation.newApplication(Instrumentation.java:975)
at android.app.LoadedApk.makeApplication(LoadedApk.java:504)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4417)
at android.app.ActivityThread.access$1300(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Disable Instant Run, delete the build folders and then rebuild project. See if it works
In fact
Instant Run tries to do hot swapping of your code; this causes the application class to be moved.
https://developer.android.com/studio/run/index.html
Instant Run pushes updated code and resources to your connected device or emulator by performing a hot swap, warm swap, or cold swap.
So you'll get NoClassDefFoundError
. To solve the problem you can either do one of these:
1- Disable Instant Run by going to: File --> Settings--> Build,Execution,Deployment -->Instant Run ---> uncheck "Enable instant run" Or
2- Perform Clean and Rebuild the app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With