Why won't Android Eclipse project update graphics? - android

After a month of development, my project has suddenly decide to refuse to update my button graphic. I took my existing 9patch button and brightened it a little, saved it, and now it won't update on my device. Eclipse shows the new graphic (eventually) but the device rendition is the old button. I have to manually Clean, but in doing so my 9patch has broken and doesn't scale. I've read my 9 Patch Image stopped working and included the jar, but still the 9patch I'm trying to change won't update on my device, or it updates as a standard fixed-sized image with the black 9patch markings showing. If I delete the 9patch from resources and replace it with another button, it works.
Basically it's as if my project has gotten hokey. I've used Clean... and resource Refresh repeatedly, but it's not playing well. Once it even said I had manually edited the R.java file after a Clean... Is there some super cleanup reset thing I can do?
tldr; When I change graphic, the new graphic isn't updated on device. I use refresh and Project/Clean but that breaks the 9patch. What's wrong?

Related

Is it me? Or android studio changed my whole build.gradle codes now my whole project is messed up now?

I was coding my android program on Android Studio and I made quite a progress on it. I remember I copied all the codes in my colors.xml (ctrl+A) when this happened. I was thinking to change the background image of my app so I deleted my background image in my drawable folder unchecking the "safe delete" option.
When the background image was deleted, I put another image using batch drawable import hoping that it would exchange the background image of my app, but it didn't. I tried to change the background image by linking the image in my code in the layout folder, same results. So I thought I could invalidate caches and restart hoping to fix the problem.
To my surprise my whole project was a mess, the errors where from my build gradle, all of the codes were changed! It was replaced by the codes used in the colors.xml
Now I can't do anything, I think I'm going to redo the whole project now but it'll take quite the time. So I'm asking here why it happened, or is there any possible solution as to I could recover my project codes? Thanks!
is there any possible solution as to I could recover my project codes?
Yes. You have few options to recover your project. One option is revert your project code which I normally do.
Right click app ---> Local History ---> Show History
Then you can select which file or time you want to revert.

Huge unusable font size in Android Studio

As the title states, I've inadvertently set the font size to something gargantuan in Android studio and it's now totally unusable. At most I see the tops of a few letters once the program loads, so I can't even get back into the options to reduce the font size. Looking through the config files has given me no joy, so I am looking for some way of adjusting the settings from outside the program itself or deleting all user customised settings and starting again without completely deleting everything. I had tried to uninstall and reinstall, which worked for a short while then the font went back from normal to huge.
**Edit: I've managed to fix it (for now at least) by moving the .AndroidStudio1.2 file from my users folder and starting Android Studio again allowing it to reset.
The way to fix this is pretty easy actually.
Navigate to C:/Users/< your account >/.AndroidStudio/config/options/
Open ui.Inf.xml and change the FONT_SIZE property to an appropriate value (12 is default iirc)
Outside of Android Studio, find your Project folder location, go into it and go into the res>layout folders, find your XML layout, open and edit the layout in notepad and you can change the size outside of Android Studio
Since you seem to be in quite the situation, go ahead and try these steps:
ctrl+alt+s
up arrow key (x7)
right arrow (x1)
down arrow (x1)
tab (x4)
backspace (x5)
type "12"
press enter

Previewing resolution specific layout in Eclipse

I've added a folder called layout-976x600 in my android project for a resolution specific layout. All works fine, but I'm unable to preview the layout in Eclipse (4.2.1 Mac OS X Mountain Lion).
In the Graphical Layout tab, I just have a blank palette, viewing area, and the text "Loading editor" is forever displayed in the information box. Is it possible to get a preview here, or am I stuck doing work in the normal layout folder and moving once finished?
EDIT:
Ultimately this was fixed by renaming the folder. Oddly enough, if I renamed the folder, opened the file, renamed back and finally opened it again, it would sometimes work. Seems to be an issue with Eclipse. I should be using a legal identifier anyhow, so I marked that as the correct solution.
layout-976x600 is invalid name. There are only limited list of qualifiers you can apply to resource folders. This page will help you.

Issue with batching the project

I'm trying to create an icon for our Android app. The png is created and was put into the proper folder of my project so it can be batched with the batch file. Up to now, everything was fine, but I did a new image I wanted to test on the emulator, but now, although the image is in the appropriate folder and my batch file configured correctly (it works for our 2 other identical projects), it won't take the new image and the previous one I tested keeps being batched despite being deleted (the .apk and key generated with the previous image were deleted as well) and also the app was removed from the emulator. Any ideas what could cause this? Also for some odd reason (I haven't touched the code of the project for well over a week), I ended up with this error "LanguageURL cannot be resolved or is not a field", I managed to fix it by copying the same line from the same project. Would that have anything to do with it?
Thanks for the help
Happened to me before... Are you sure the icon fits the specs?
Look here: http://developer.android.com/guide/practices/ui_guidelines/icon_design_launcher.html

problem with R.drawable class and SVN

I have a project which is connected to SVN server. I use Subclipse as the SVN Client.
I have some problem which I don't know what's the cause. the problem is,when i delete some images from res/drawable folder my program's images become so broken. lets say for example
the splash screen image changed with some button image
the button image changed with background image
etc,, everything is changed.
The problem will be gone if I revert back the change (restore the deleted images). That will be some trouble if I can't delete any unused resources at all. I don't have any idea about this problem. does anybody ever have the same problem?
note : I deleted the images when my connection is off. is that
You should commit deleting changes
Try to rebuild R class.

Categories

Resources