Android Studio 2.0更新 - public static volatile com.android.tools.fd.runtime.IncrementalChange [英] Android Studio 2.0 update - public static volatile com.android.tools.fd.runtime.IncrementalChange

查看:221
本文介绍了Android Studio 2.0更新 - public static volatile com.android.tools.fd.runtime.IncrementalChange的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Android 2.0更新后,我的模型对象中添加了一个新字段public static volatile com.android.tools.fd.runtime.IncrementalChange com.pr4.models.User。$ change

After I update with Android 2.0 a new field has been added into my models object public static volatile com.android.tools.fd.runtime.IncrementalChange com.pr4.models.User.$change

我遇到了什么问题:即我正在使用反射包读取字段并使用字段创建动态表,并且我的应用程序因新字段$更改而崩溃,如果我检查跳过特别是修饰符字段然后我必须做很多改变。
为什么我的代码在运行时添加了一个新字段,如何摆脱它?

What problem I have faced : i.e I was reading the field using reflection package and creating a dynamic table using fields, and my app get crashed due to new field $change, If i put a check to skip particular modifier field then I have to make lot of changes. Why a new field was added at runtime in my code, how to get rid of it?

推荐答案

它发生了由于Instant Run在2.0 Android studio中引入了一项新功能,因此可以按如下方式禁用它。

It happens due to Instant Run a new feature introduced in 2.0 Android studio and it can be disabled as follows.

http://tools.android.com/tech-docs/instant-run

默认情况下,Android Studio会在执行热插拔后自动重新启动当前活动,同时应用程序将继续运行。要禁用此设置:

By default, Android Studio automatically restarts the current activity after performing a hot swap, while the app keeps running. To disable this setting:

打开设置或偏好设置对话框。

导航到构建,执行,部署>即时运行。

取消选中代码更改后重新启动活动旁边的框。
如果禁用自动活动重启,您可以通过选择运行>重新启动活动从菜单栏手动重新启动当前活动。

Uncheck the box next to Restart activity on code changes. If automatic activity restart is disabled, you can manually restart the current activity from the menu bar by selecting Run > Restart Activity.

这篇关于Android Studio 2.0更新 - public static volatile com.android.tools.fd.runtime.IncrementalChange的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆