Android Studio各种坑爹之:dalvikvm: Could not find class 'android.util.ArrayMap'

今天不知道为什么,总是遇到各种错误,不是程序的BUG,是AS的问题,作为程序员,我们要有耐心去对待。Log里错误如下:

04-10 11:09:48.029 20658-20658/zhuo.myapp E/InstantRun: Could not find slices in APK; aborting.
04-10 11:09:48.039 20658-20658/zhuo.myapp E/dalvikvm: Could not find class 'android.util.ArrayMap', referenced from method com.android.tools.fd.runtime.MonkeyPatcher.monkeyPatchExistingResources
04-10 11:09:48.039 20658-20658/zhuo.myapp E/dalvikvm: Could not find class 'android.util.ArrayMap', referenced from method com.android.tools.fd.runtime.MonkeyPatcher.pruneResourceCache
04-10 11:09:48.059 20658-20658/zhuo.myapp E/dalvikvm: Could not find class 'android.widget.Toolbar', referenced from method zhuo.myapp.MainActivity.access$super
04-10 11:09:48.069 20658-20658/zhuo.myapp E/dalvikvm: Could not find class 'android.app.ActivityManager$TaskDescription', referenced from method zhuo.myapp.MainActivity.access$super
04-10 11:09:48.069 20658-20658/zhuo.myapp E/dalvikvm: Could not find class 'android.app.SharedElementCallback', referenced from method zhuo.myapp.MainActivity.access$super
04-10 11:09:48.069 20658-20658/zhuo.myapp E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method zhuo.myapp.MainActivity.access$super
04-10 11:09:48.069 20658-20658/zhuo.myapp E/dalvikvm: Could not find class 'android.transition.TransitionManager', referenced from method zhuo.myapp.MainActivity.access$super
04-10 11:09:48.079 20658-20658/zhuo.myapp E/dalvikvm: Could not find class 'android.app.assist.AssistContent', referenced from method zhuo.myapp.MainActivity.access$super
04-10 11:09:48.079 20658-20658/zhuo.myapp E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method zhuo.myapp.MainActivity.access$super

搜来的解决办法如下:

File - Settings - Build,Execution,Deployment - Instant Run,去掉Enable Instant Run...边上的钩,点击OK即可。

这一招管用,去掉了那些警告的信息。

你可能感兴趣的:(Android Studio各种坑爹之:dalvikvm: Could not find class 'android.util.ArrayMap')