I got an app and there is this tiny error about the image name. The name is 'bg.png.png' which was allowed in Eclipse but not in Android Studio. If I fix it, I get 100 errors regarding 'Error retrieving parent for item'.
By the way I am using appcompat7 too. So I don't know how to fix and where this images is called in the code because the code is huge and I am not very good at android.
Select the image and press Shift+F6 (OR Right-click->Refactor->Rename). This will start the refactoring of selected image name. change the name to a valid one while highlghted and hit Enter. It will get renamed in all referenced places. Will prompt for confirmation so you have a chance to cancel if you feel it is not refactoring correctly. But it works just fine so you need not worry.
Related
I am locked with Android Studio.
As I was developing my first android app, I sometime pushed the "Run 'app'" button to test and see how the app was working. With no problem up to this point, but then I tried to use Image Asset Studio to make my own icon. And now when I try to use the "Run 'app'" button to test, all I can see is the image below keeping coming back and the app is no longer started. I guess I did something wrong on the way; though I have no idea what. Can anyone think of what I should do to get back on my feet and have the app working again? I haven't changed any part of the code since it was last working.
And hereafter is a second screenshot showing an error:
Running the find command on the project directory, for the file ic_launcher.webp, I get this result.
I suppose some of the files shouldn't be there.
MyMac$ find AndroidStudioProjects/MyApp -name ic_launcher.webp
AndroidStudioProjects/MyApp/app/src/main/res/mipmap-mdpi/ic_launcher.webp
AndroidStudioProjects/MyApp/app/src/main/res/mipmap-hdpi/ic_launcher.webp
AndroidStudioProjects/MyApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
AndroidStudioProjects/MyApp/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
AndroidStudioProjects/MyApp/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
MyMac$
But for comparison if I run the same command on the directory for a project where this issue does not appear. I find even more of the ic_launcher.webp file, so I must be missing some detail.
MyMac$ find AndroidStudioProjects/MyOtherApp -name ic_launcher.webp
AndroidStudioProjects/MyOtherApp/app/build/intermediates/packaged_res/debug/mipmap-xxxhdpi-v4/ic_launcher.webp
AndroidStudioProjects/MyOtherApp/app/build/intermediates/packaged_res/debug/mipmap-hdpi-v4/ic_launcher.webp
AndroidStudioProjects/MyOtherApp/app/build/intermediates/packaged_res/debug/mipmap-xhdpi-v4/ic_launcher.webp
AndroidStudioProjects/MyOtherApp/app/build/intermediates/packaged_res/debug/mipmap-mdpi-v4/ic_launcher.webp
AndroidStudioProjects/MyOtherApp/app/build/intermediates/packaged_res/debug/mipmap-xxhdpi-v4/ic_launcher.webp
AndroidStudioProjects/MyOtherApp/app/src/main/res/mipmap-mdpi/ic_launcher.webp
AndroidStudioProjects/MyOtherApp/app/src/main/res/mipmap-hdpi/ic_launcher.webp
AndroidStudioProjects/MyOtherApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
AndroidStudioProjects/MyOtherApp/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
AndroidStudioProjects/MyOtherApp/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
MyMac$
TLDR: firefox for android does not show expected about:config screen.
Firefox: 39.0
Phone: Nexus 5
I am trying to install and configure an extension on firefox for Android.
I've been following these instructions, which work fine until I have to alter the filepath in about:config.
At this stage, I need to modify the settings to show firefox where a certain .txt file is. I can easily find the setting I wish to modify, but cannot find a way modify it.
The expected menu (with Modify) never shows up, and instead the only options I can get are "copy name" and "copy value".
Images of the expected interface, and actual interface:
Expected interface (from walk-through):
Actual interface (screenshot):
After searching, trying to find the modify option:
Eventually, with a lot of trial and error, got it fixed. The about:config interface has changed since the guide I was following was pasted, but it ended up being a very good step by step anyway.
Solution:
The new interface has an area where there is nothing written, which you need to over-write with the desired path (in my case it ended up being /storage/sdcard0/silent_block_directory).
Two pieces of advice to avoid making the same mistakes as I did:
1. Don't point the path at the .txt file, but rather at the parent directory
2. Don't look for the modify button, it does not exist any more.
This might seems silly but seriously I don't even know why it reacts that way. I am using eclipse JUNO, and I just trying out simple program enables me to put an image inside the layout after my real program said it have the error.
The project shows the error icon but when looking all in the subs-project like the class, layout everything, it is crystal clear. You can see it like the picture above.
I have making an android project before I am updating the adt and stuff. Before this, all I do just put any picture(s) I want in any folder drawable. I believe this is the right step and I know I do the same thing in here but it have issue with it. I even search on the basic tutorial how to put the image and it did the same why I did.
Does anyone knows what had happen here?
Android dont allow image names to contain capital letters in drawable folder change the name to contain only small letters
Capital letters , and some symbols are not allowed to be in the name of the png file , update the name of the png file , . make it in smaall letters
As per user inazaruk's answer, Hence the reason for not using special characters inside file names, as they can no be used in Java names.
As for capital letters, I guess that's to avoid one little problem in Windows vs. Linux environment. That's because Linux thinks that Icon.png and icon.png are different files, and Windows thinks that Icon.png and icon.png is the same file. So anyone using Linux can create application that is not compilable on Windows.
So, change your Humanpng with human Also don't use the extension png as picture name.
Just check your Problems tab in Eclipse. You can find it from
Window > Show View > Problems.
There you can find the error description.
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 am new to Android development.
I created an Android project, and imported some images as resources.
Unfortunately, one of them contained a capital letter, which is illegal. I have first renamed, then removed the offending image. Then I delete all images, but Eclipse still insists they are there after clicking refresh refreshing and running clean several times.
Could anyone tell me how to fix this?
If the file actually exists in your workspace . Just Right Click the file and select Validate . It should be alright