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
Related
I just copied an Android Studio project into a new folder and want Android Studio to work on the new folder from now on. Unfortunately the layout files are not correctly displayed (I only see a grey layout without any elements) and I get the message that "This project does not use the Gradle build system". I do not undestand why this error occurs. I have not added or deleted anything from the original files and projects. I invalidated the cache and restarted but the problem still exists.
Does anyone have a clue what I have to do? I'd appreciate every comment.
Do you have an idea what the problem might be and what I have to do. I'd be quite thankful for your help as I do not know what to do.
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.
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.
I'm not sure why this is happening.. But sometimes when we have a new build, the 9 patches don't work (the actual 9 patch image gets stretched instead of being scaled properly)..
I'm not sure why this happens, but i think it happens after cleaning and creating a new build, i have to uninstall, and re-build to fix it..
I'm just worried when we release, customers might get this screen (it looks terrible).. Any ideas why this is happening?
Rename any of your resource file name then refresh your project. Again rename that file to the previous name and refresh your project again. Run the project it will work fine.
The only 'fast' way I found on fixing that issue is renaming the nine patch drawable to a temporal name and then rename it back to it's original name.
I know it's a bit hacky but at least it works :D
When I add drawable resources to my project they do not show up in the list of drawables in the Reference Chooser. I checked the R file and there are references for the files.
I have tried refreshing the project, cleaning the project, and fixing project properties and nothing seems to help. Sometimes a couple will randomly show up in there, but not all of them.
The only consistent way I can get them to show up is to restart Eclipse.
Any ideas?
Thanks
Edit: Further findings:
After some trials, I found an other inconvenient work around to he issue. Turns out when importing multiple files into the project at once, Eclipse will only add the last one imported into the reference chooser. So when I imported my images one at a time, they all show up properly!
Like I said, inconvenient considering the amount of images I have left to import, but maybe with this new information it may help nail down where the issue may be and a possible fix.
I too faced the same problem. I added an image to the res/drawable-hdpi folder, cleaned the project and was able to see the name of the image in the left pane in Eclipse. But when I tried to use this image using Reference Chooser and looked under Drawable, I didn't find it.
I simply exited from Eclipse, and started it again. It was there! Like many things in computers, problems can be resolved simply by restarting!
The only way I found to fix this is to include the generated R class itself.
I found out some new info again.
Since I am doing a port from Blackberry, almost all of my images' filenames have uppercase letters in them, so I end up importing them all and then having to rename all the images after they are imported into the project.
I tried renaming all of my images before importing them all into the project. To my delight, all of the images showed up right away in the reference chooser! So it seems there is a problem when you import files and they cause errors with your project and allowing all of them to show up in the reference chooser.
So if you have to rename files, do it before import!
I'm just not entirely sure that this is the only cause for this issue but it has solved the problem for me.