java.lang.NoClassDefFoundError: Failed resolution of: Lcom/android/tools/ir/runtime/IncrementalChang

 

 

问题原因:

NoClassDefFoundError是因为Java虚拟机在编译时能找到合适的类,而在运行时不能找到合适的类导致的错误。

 

解决方案:

File> Settings> Build,Execution,Deployment> Instant Run> Enable Instant Run to hot swap code/resoure changes on deploy(default enabled)   关闭该选项重新运行即可。