Android Studio 未将更改部署到应用程序 [英] Android Studio not deploying changes to app

查看:21
本文介绍了Android Studio 未将更改部署到应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有时在开发时会出现这种情况.我会更改我的源代码,点击全部保存然后运行,但更改显然不会反映在应用程序中 -(我正在使用设备进行测试).我什至可以在我的设备上卸载该应用程序,然后再次点击运行,新安装的应用程序仍然没有反映源代码中的更改.发生这种情况时,我必须编辑源代码,点击运行,然后可能会在设备上出现一个包含我预期更改的新版本.

Sometimes this scenario occurs when developing. I would make a change in my source code, hit save all and then run but the change wouldn't be apparently not reflected in the app -(I'm using a device for testing). I can even uninstall the app on my device, and hit run again and the newly installed app still hasn't reflected the change in the source code. When this happens I have to edit the source, hit run and maybe then a new version with the changes I expected will be on the device.

我也尝试过这里的解决方案,但似乎并不经常奏效.

I also tried the solution here, but it doesn't seem to work often.

Android Studio - 无需新更改即可部署我的应用

推荐答案

我遇到了同样的问题.当我搜索它时,这个线程首先弹出.通过不使用即时运行功能解决了它(希望如此).可能不是最好的解决方案,但目前有效.

I've got the same problem. This thread popped up first when I've searched for it. Solved it (hoping so) by not using the Instant Run feature. Might not be the best solution but it works for now.

只需转到文件 -> 设置 -> 构建、执行、部署 -> 即时运行"并禁用它.这个 Android Studio 每次都从头开始构建,但总比没有正确构建好.

Just go to "File -> Settings -> Build, Execution, Deployement -> Instant Run" and just disable it. With this Android Studio builds from scratch each time but it's better than not building it right.

迷你咆哮:几乎每个版本的 Android Studio 都有一个恼人的错误.他们即将发布第 2 版,但它的测试版仍然有问题.我希望他们在不久的将来稳定 IDE.

Mini rant: Almost each version of Android Studio comes with an annoying bug. They're about to release the version 2 but its beta is still buggy. I hope they stabilize the IDE in the near future.

这篇关于Android Studio 未将更改部署到应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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