使用AndroidStudio运行项目,安装debug版本,安装失败,有时候会出现以下的提示信息: Installation failed since the device possibly has stale dexed jars that don't match the current version (dexopt error). In order to proceed, you have to uninstall the existing application. WARNING: Uninstalling will remove the application data! Do you want to uninstall the existing application?
截图:

安装成功之后,但是运行app闪退的时候,而且报以下这个错误的时候: Caused by: java.lang.ClassNotFoundException: Didn't find class 这时你需要在build目录下,RebuildProject下就可以,然后运行项目,就不会报ClassNotFoundException这个错误,app不会再闪退。
如果再不行的话,可以参考《Android Studio: Failure INSTALL_FAILED_TEST_ONLY》
即步骤:as导航栏Run---->EditConfigurations----->选择app------>然在Install Flags加上"-t"即可!!!!