How I can open this file on android studio? - android

I can't open app folder as you see on the screenshot.
Can any one help me to solve this problem?
I use android studio.

It looks like you may have imported something incorrectly (or at least, Android Studio didn't take it correctly).
You can try changing the view of the project by clicking on "Android" above your files:
Then choose "Project," which should bring up a different view.
If "app" is still empty, then something is wrong with the files that you imported.

Related

How to resolve android studio formatting error?

I'm sorry for the title of my question but that's the best title i could come up with....
It seems like my android studio project just got butchered from one day to the next. When i open some of my java file, i see nothing related to my code same thing with most of my xml files, but when i navigate to those files in my file explorer and open them same files with notepad i then see the correct content.A screen shot of one of my java files
And one of my xml files
This is a common problem in Android studio
Please follow this answer
https://stackoverflow.com/a/63027190/7793652

No "android resource directory" option on right clicking res folder

I'm an iOS developer, and I'm expanding my skill set by working through the recommended Udacity tutorials for Android development.
In the "Add a Menu" tutorial in "Developing Android Apps", in order to create a new XML file for menus, it states:
"right click the res directory, select 'Android Resource Directory'". This is followed by a number of other points to correctly set up a menu xml file.
On my system, when I right click on the res directory, I have no option for "Android Resource Directory". I've uploaded a screen grab of what I get:
compared to the tutorial:
I've tried just creating a standard directory, and then right clicking and making a new xml file within it, but it doesn't seem to be working, as the XML file won't even open when I double click on it. I'm guessing it also won't be setup correctly, and I'm not sure how to do that manually.
I also tried the "Resource Bundle" option, but it didn't seem to give similar options as to what the tutorial says is to be expected.
I've had a look in the Udacity forums, and didn't see anything there on this. They also didn't seem to be frequented much, so I thought asking here was a better idea.
I'm also guessing Gradle sync error is not causing this, I haven't looked into the cause of that yet, I think perhaps because of my Core2 processor...
My guess is it's to do with my newer version of Android Studio, but I've been unable to find any info on this.
Thanks for any pointers :)
Seems like your gradle project files are not synced properly. As it is in screenshot you shared. You need to make sure gradle syncs successful so android studio will provide those context menu options properly for specific directory
Here - Resource directory
Click on Build->Clean Project and then file-> sync project with gradle file
Try the menu New/Folder/Font folder

Android Studio changes folder structure

currently, I am working on a android side project in my free time. As my project grows, I change the project structures so that I can maintain it easily. But whenever I add a sub-folders, the android studio automatically changes the structures as shown below.
If I go to the actual project folder, it is properly structured as "Fragments" folder contains "SignupFragments" sub-folder.
Does anyone know how to fix this?
The solution was un-checking "compact empty middle packages" in the directory setting options by clicking the gear button.

Android Setting Background

I'm trying to change the background of my first app to a png I have. I put the png in a newly created folder called "drawable." When I go to browse my "drawable" I can't see it's "children" or files. The only error of sorts that it gives me is "You must... rce item" anyone run into this? Android API 7 by the way.
Put the png in /res/drawable and then do a clean on your project in eclipse to force the .R class for your app to be recreated. You might also need to do an f5/refresh in eclipse on the project to get it to see that you have added a file in filesystem to /res/drawable.

Finding out where a file in the project explorer is used in the code in Eclipse IDE

I am developing android applications using Eclipse IDE.
Now, I have given someone else's code to modify.
I need to check where a particular drawable/image in the res/drawable folder is used in the code or in the xml (res/layout). Also I need to find where I a particular xml (res/layout file) is used in the code.
Is there any short-cut to find out these things or I need to go through each & every line of code to find out these things ?
Please help.
#Ankit
For First Thing for checking a particular drawable/image in the res/drawable folder if you want to find that whether image resource is used in project or not for that you have to search like this in Eclipse For Example Your image name is bg.png so you can search like this using Ctrl+h in your Project Explorer than when search window Open you will find one File Search tab than write this in search box #drawable/bg than you will get Match Result.
For Second Thing Now use Same Ctrl+h than write this R.layout.yourlayoutname in search box than if this layout is used in your android project than you will get result for that.

Categories

Resources