运行我的新代码会运行我的旧代码? [英] Running my new code runs my old code?

查看:103
本文介绍了运行我的新代码会运行我的旧代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无论如何,无论我添加到程序中的代码如何,它都不会在我的android设备上运行.它只是运行我的旧代码.

Somehow, whatever code I add to my program it does not run on my android device. It just runs my old code.

  • 我一直在从应用程序管理器中的手机中删除我的应用程序.
  • 如果我添加新功能或更改功能,旧代码仍会运行.
  • 我什至删除了应该抹杀功能的完整代码块.但是重新安装后,所有旧功能仍会保留在应用程序中.

简单的示例:在TextButton上,单击"i",将某些UI元素移动200.这很好用.当我删除完整的按钮侦听器时,它仍然可以很好地工作,但是我猜完全是因为代码应该消失了.

Simple example: On a TextButton click i shift some UI element by 200. This works great. When i delete the complete button listener it still works great but i guess completely by itself since the code should be gone.

  • 我没有运气就尝试重新启动Eclipse.

这件事使我发疯.我在一些简单的代码上呆了几个小时,并对为什么它无法运行感到困惑.然后,我发现我的日志未显示在logcat中.不知何故,有时它确实会将新代码更新到设备中,因为现在我已登录设备恢复,但至少在30分钟前删除了它,现在它仍显示在我的logcat中.

This thing is driving me crazy. I was stuck for hours on some simple code and baffled why it did not run. Then I discovered my logs where not showing in logcat. Somehow, sometimes it does update the new code into the device since now i have a log on device resume but i deleted that at least 30 minutes ago and now it is still showing in my logcat.

桌面应用程序可以正常工作.某种程度上,我感觉这件事发生了,随着时间的流逝,情况变得更糟,直到现在我再也无法测试任何东西了.

Desktop app works as it should. I somehow have the feeling this happened before and over time this got worse, up to this point where i cannot test anything anymore.

请注意:

  • 我向我的应用添加了代码.
  • 从eclipse作为Android应用程序运行
  • 未显示任何更改
  • 使用电话应用程序管理器从电话中删除应用程序
  • 删除一个完整的代码块,例如show()方法,该代码块保留了我的完整阶段
  • 从eclipse作为Android应用程序运行
  • App仍按原样运行,处于完整阶段.
  • I add code to my app.
  • Run it from eclipse as Android application
  • No changes show up
  • Delete app from phone using the phones Application Manager
  • Delete a complete code block like the show() method that holds my complete stage
  • Run it from eclipse as Android application
  • App still runs as it was with the complete stage in tact.

-编辑-

现在我有一段时间没有对我的代码做任何事情并运行它.现在,它可能使用了带有空show()方法的版本的代码.但是,目前这已经被撤销.蚀会叠加运行吗?

Now I did not do anything to my code for a while and ran it. Now it probably took the code with the version with the empty show() method. However this already has been undone in the present. Could eclipse be stacking runs?

推荐答案

检查

项目->自动构建"

"Project -> Build Automatically"

已检查. (很可能是您的问题).

is checked. (Most likely your problem).

也在做

项目->清洁..."

"Project -> Clean..."

告诉IDE删除任何以前编译的二进制文件并重新生成它们. (APK文件).

tells the IDE to delete any previously compiled binaries and rebuilds them. (The APK file).

这篇关于运行我的新代码会运行我的旧代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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