English 中文(简体)
改变阵列中的价值观
原标题:Changing values in array doesn t propagate into application
  • Goal: Demo activity displays list of String items in a list
  • Dev. environment: Eclipse, android emulator as device
  • Implementation: When activity is created, it stores String items from array defined in a xml resource file, and creates binding to ListView object via ArrayAdapter

在我开始申请时,一切都做了罚款。 清单载有预期的项目。

Issue: However, I decided to change the values in the array definition in the xml file, and also the name of the array.

自然,我改变了从xml文档到法典中的新版本阵列名称的所有发生。 现在,我Run。 我在申请中再次看到原来的价值观。

What should I reset so the changes of the values become visible?

So far, I tried this:

  • application in emulator manually uninstalled, and then installed again via Run
  • started emulator manually with option wipe user data checked
  • Eclipse restart
最佳回答

You are probably changing the XML files through an external editor and not through Eclipse. The build process checks whether there are changes in the project before creating a new APK. If you change a resource / xml / source or anything outside of the Eclipse environment, you have to refresh the project (or the changed files) to allow the APk to be rebuilt.

Cleaning the project, as Pyrodante suggested, will achieve the same goal, as the APK will be rebuilt with the new files after cleaning.

问题回答

暂无回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签