为什么我的代码在我的应用上不更新? (更新日食后) [英] Why is my code not updating on my app? (After updated eclipse)

查看:174
本文介绍了为什么我的代码在我的应用上不更新? (更新日食后)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



问题

$ b $

在您没有看到任何代码(可笑的理由拒绝)之前,请先删除我的问题b

问题是,即使我更改代码并在手机上运行,​​它将运行,但应用程序将不会实际更改。



例如:如果我曾经在onCreate中使用Toast表示hello world,然后将文本更改为应该更新然后运行它,吐司还是会说hello world



导致问题的原因



我更新了我的SDK工具,然后更新了Eclipse。我更新了所有需要在SDK管理器中更新的Android SDK工具。然后,我这样做来更新eclipse:帮助 - >安装新软件... 然后点击添加... ,然后输入ADT插件作为名称,
https://dl-ssl.google.com/android/eclipse/ 为该位置。然后我更新并重新启动Eclipse或其他任何东西。



以下是我工作区加载的截图:





我尝试过的




  • 删除手机上的应用,然后运行

  • 删除手机上的应用,更改应用程序,然后运行它(虽然我没有看到这是否会工作,因为Eclipse是如此糟糕,它不让我甚至在我的手机上运行应用程序)。我以前更改了包名称,我知道如何做。 Eclipse吸吮,而不是我。
  • 清理项目(它没有生成我的R.java文件,所以我没有看到这是否会有效)


我已经阅读了,没有帮助:为什么我更新的Eclipse / Android设置不再构建我的APK?



我可以尝试什么



我可以尝试从头开始重新安装Eclipse,但是我担心我的应用程序签名会发生愚蠢的事情,由于某些原因我将无法使用我的旧项目就像他们一样。我也通过我的一个旧的钛下载程序运行eclipse。我不使用Titanium,但最初我的Eclipse正在使用Titanium软件包进行下载。这可能对恢复我的旧项目并使他们有效的方式有一些影响。






它真的只是似乎这个Eclipse是超级越野车。我不知道我有什么版本,但它不是很老。现在我甚至不知道我有什么版本。我以为我得到了22.0或者是什么,但屏幕截图显示为21.0.1-543035。

解决方案

进入SDK管理器在工具文件夹中安装Android SDK Build-Tools。



这是SDK版本22的新功能。在rev 22的更新文本中是:


•通过添加新的构建工具SDK更改SDK的结构
基于现有平台工具组件的组件。
此更改将构建工具版本与IDE版本分开,
允许更新工具,而不需要IDE更新。


由于此更新,构建APK的工具不包含在SDK更新中,因为它现在是独立的项目。因此,您的APK将不会被更新,但仍然会安装,因为它已经安装了现有的APK。


Before you downvote my question because you don't see any code (ridiculous reason to downvote), read it.

The Problem

The problem is that even when I change my code and run it on my phone, it will run but the app won't have actually changed.

For example: if I used to have Toast that would say "hello world" in onCreate, but then I changed the text to "should be updated" and then ran it, the toast would still say "hello world".

What caused the problem

I updated my SDK Tools and then updated Eclipse. I updated all of my Android SDK tools that said needed an update in the SDK manager. Then, I did this to update eclipse: Help --> Install New Software... then I clicked Add..., then entered 'ADT plugin' for the Name and
https://dl-ssl.google.com/android/eclipse/ for the Location. Then I updated and restarted Eclipse or whatever.

Here is the screenshot of my workspace loading:

What I've tried

  • Deleting the app on my phone and then running it
  • Deleting the app on my phone, changing the package name of the app and then running it (although I didn't get to see if this would've worked because Eclipse is so bad that it didn't let me even run the app on my phone). I've changed the package name before and I know how to do it. Eclipse sucks, not me.
  • Cleaning the project (it didn't generate my R.java file, so I didn't get to see if this would've worked)

I've read this and it doesn't help: Why is my updated Eclipse / Android setup not building my APK anymore?

What I could try

I could try reinstalling Eclipse from scratch, but then I'm worried that something stupid will happen with my app signatures and for some reason I won't be able to use my old projects just as they were. I'm also running eclipse through one of my old Titanium downloads. I don't use Titanium, but originally my Eclipse was downloading in a Titanium package. That might have some effect on how easy it would be to recover my old projects and get them working.


It really just seems like this Eclipse is super buggy. I don't know what version I had beforehand, but it wasn't very old. Right now I'm not even sure what version I have. I thought I was getting 22.0 or something, but the screenshot shows 21.0.1-543035.

解决方案

Go into the SDK Manager and install the Android SDK Build-Tools in the Tools folder.

This is new to SDK revision 22. In the update text for rev 22 is this:

• Changed the structure of the SDK by adding a new build tool SDK Component, which is based on the existing platform-tools component. This change decouples the build tools versions from the IDE versions, allowing updates to the tools without requiring an IDE update.

Because of this update, the tool to build APK's was not included in your SDK update, since it is now a standalone item. As such, your APK would not have been updated, but would still install since it had an existing APK already built.

这篇关于为什么我的代码在我的应用上不更新? (更新日食后)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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