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.
Related
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
This is how it looks:
and when I create a new subdirectory this way
the newly created directory doesn't show up under 'res.'
But if I go to the physical location of res,
AndroidStudioProjects/MyFirstApp/MyFirstApp/app/src/main/res
There is a new folder with the name under which I created a directory.
Why is it happening?
I closed and restarted android studio, but it doesn't fix the problem.
Thank you very much for your help.
Android Studio --> Project Tab on Left side --> Choose Project from Spinner, not Android Item. And You can add folder. If It is not clear, I can share picture for more.
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.
I was working on my android project, which is stored on Google Drive, and I started getting a bunch of errors. When I looked, it looked like every folder in my project had a desktop.ini file added to it. I figured that I would just go into Google Drive and delete them all but if I search for desktop.ini it returns no results in Windows Explorer. I've tried deleting them through Eclipse but it seems like when I delete one, three more take it's place. I'm not sure what's going on or how to fix this, any help would be greatly appreciated.
if you click on the package or class and then click on the top bar "Project", an option page should open. navigate to:Resource - Recourse filters. click on add filters. Filter type: exclude all. Applies to files (all children). type desktop.ini in the box and click ok.
I have an Android project, and I wanted to replace two of the images I use in it with updated ones. So, with Eclipse i just delete the old one and replace it with new one with same name. Then i refresh the project.When i see this in drawable folder it was replaced but when i run this project it was still showing old image in my app.
Please let me know the solution.This is very urgent.
First make sure you have replaced the image(s) in all drawable-* folders. If that is the case, doing Project->Clean (and selecting your project) in Eclipse after the refresh of the project files should do the trick. Also, before re-deploying on the device, uninstall the previous version of the app.