Android Error or Bug Idk? - android

ok so here's the problem in eclipse I am making a metric to standard and back calculator but I keep getting errors and I had to delete one of my layouts and remake it but now when I remake it it brings up the old layout and I am so confused and now when I try to edit it and save it I get this as a popup message:
title:Update Conflict
message:The file '/TemperatureConverter/res/layout/measurement.xml' has been changed on the filesystem. Do you want to override changes made on the file system?
What do I do to fix this?

I got it I just had to do allot of deleting and cleaning... sorry for wasting your time guys

Related

Project Android not compiling with Eclipse?

k-9-master\k9mail\src\main\res\values\themes.xml:126: error: Error
retrieving parent for item: No resource found that matches the given
name '#android:style/Theme.Holo.Dialog'.
Why am I getting this error?
There are many possible causes of an error. However, if you simply do not see any reason this should be occurring, try a project clean, or simply create a new project and pull over all the files you intended to add to this project.
This is fairly likely to solve your issue as XML files often seem to cause me random problems - i.e. one day it is working, and the next time I open my project (e.g. if put it in different folder and bring it back to same location) it might not be working. I think Eclipse and Android Studio like to edit XML files by themselves sometimes without you knowing about it for some reason unbeknown to me.

Initiating "Clear data" for an app from settings in app code (Android)

I know this may seem as a silly question, but is it possible?
In cause you are wondering why am is asking this... I made an update to an app of mine that, if installed over the previous versions, it make it crash in a certain vital point, and it will only work if you go to settings and "Clear Data". I was wondering if i could use some code snippet to make this automatically for this version.
A better fix to your problem would be to figure out why it is crashing at this point and to address that. You can likely make use of the SqliteHelper#OnUpgrade method to accomplish this.
that being said. I assume that this would fix your problem:
File dir = context.getFilesDir();
FileUtils.cleanDirectory(dir);
That gets the private file directory for your application and clears it, which is essentially what the clear data function will do.
You probably need to delete the SQLite file and SharedPreferences.
You can do some answers in this question :
How to programmatically clear application data

Android code overwritten by gibberish characters

Hi all. Today when I opened my eclipse some of the files in my particular project were seen as below. I havent really experienced such a problem and i dont know how to recover my overwritten code. I have tried cleaning up the project and restarting eclipse but nothing seems to work. any help is welcome. As it is very important for me to recover these files. Thanks in advance.
You can watch the local history of the file in Eclipse. If something exists there, restore it.
Right click on project:

Very strange error when importing images to Eclipse

I found a very strange and anoying bug.
Im developing in Eclipse, i use several images for my app.
Sometimes when i import a new image to the project and use it somewhere in my app, after the test run all the images are went to another places... Its like every image has changed their resource ID and they are all moved to another places... background loads for buttons, button image loads for scrollbars.. etc... every image is bugged and appear in random places!
Nothing can solve this bug, except deleting my app manually, then run again.
I work on my phone, not Emulator.
It is really annoying, i dont want in the future that when im updating in market, the users will get a messed up app...
Anybody know something about this?
That's probably because the R.java is messed up.. try to do Project->Clean and see if that solves the problem
If you are importing any image make sure that the name of the images in not in Capital letter and also its name doesn't start with any numeric value. Otherwise its going to create problem in generating its id in R.java.

aapt error on android

When I have an layout test.xml file open and click on Run Android creates an empty test.out.xml file and creates an "Unparsed appt error".
Even when I delete the newly created file the "Unparsed appt error" doesn't disappear.
What happens here?
How can I fix the error? Is there a way to prevent this from happen when I accidentally click on run while in a .xml file instead of being in a .java file?
If you run Project/Clean, the error will go away.
Regarding preventing this from happening, you have to change the build action for XML. I have not spent the time figuring out how to do that, but since this is such an annoying thing, I'd be glad if someone could post the steps.

Categories

Resources