Is there "Save as" option in Android Studio file menu? - android

I have recently move from Eclipse to Android Studio. I could not find "File > Save as" options. Is there any alternative for this?
(Sometimes, I create new class or XML by creating new one from already existed content, and than do changes. In Eclipise I have been doing this by using "Save as" options from File menu)

The easiest solution which I've used multiple times would be:
Right click on the original file in project hierarchy panel.
Choose Refactor
Choose Copy
Enter New Name and Destination Package
Shortcut: F5

Related

How to place admob ads to application without having activity_main.xml file

enter image description hereI'm beginner to android studio . I downloaded code from this link :- https://github.com/jahirfiquitiva/Frames . In this code there is no activity_main.xml file . I want to place admob ads to this application . Can anyone help me to place admob ads to this "https://github.com/jahirfiquitiva/Frames" frames application .
Thanks in advance .
Please don't get confuse with library and actual applications.
https://github.com/jahirfiquitiva/Frames is a library that you can include into your project/app using gradle -
dependencies {
implementation('dev.jahir:Frames:3.3.0'#aar) {
transitive = true
}
}
After importing you can create your application and then you can put admod in your app's main layout file.
Edit (Missing Layout Folder)
If the folder isn't there or wasn't added automatically when you created the project, you need to add it to your project in the following way:
Right-click on the res folder
Select New -> Android Resource Directory from the menu that opens
Select Resource type to be layout from the popup that opens
Click OK
After creating the res folder you can add layout folder as well
Right-click on the layout folder
Select New -> Layout Resource File from the menu that opens
Enter your new file name
Click OK
Now you have XML file you can use into you activity/fragment.
Please check this and this for more info.
Happy Coding !

I don't have folder option

Hi i wanted to make an assets folder but i have no option to do it , is it in another place , I've tried searching google but no results , also i tried installing tools in sdk manager with no luck , is there anything to do maybe i missed something ,btw im a beginner
i don't have file > new > folder
Thanks in advance .
In your screenshot, in the right-most fly-out menu, choose "Directory" to create a directory.
However, assets/ goes in src/. So, right-click over src/ for your desired source set, then choose File > New > Directory from the context menu.

Cant open project when I click the app

Whenever I try to open C:\Users\user\Downloads\NYP\NYP\app, it always show C:\Users\user\Downloads\NYP\NYP instead. How to solve this?
Edit:
I have this path C:\Users\user\Downloads\NYP\NYP\app that opens the app.
However , whenever I click on this path, it leads me to open up C:\Users\user\Downloads\NYP\NYP instead which is to bring the path up a level
You should open the project as C:\Users\user\Downloads\NYP\NYP only. The app folder is a part of it. Once the project opens, choose Android in the top left drop down above the file directory.

Android Studio 1.2.2 - New directory can't be created or showed or used

what I am trying to do is to create a new directory (styles) in res directory so that I can store all my styles there and can manage my codes easily from there. I have done it in Eclipse many times in the time of android development.
So, what I am doing is given in the pictures -
Step 1 -
Step 2-
Step 3-
Step 4-
But the problem is the the new moved directory is created (it is seen from the top navigator - red marked), but it is not shown in the left navigator and the file shows error.
If I try to add a new directory, it also not showing the file directory in the left. So, I can't create a new directory in any way in res directory.
Is there any way to create a new directory what can be used in codes for managing codes in res directory or it is not supported in Android Studio?
Can anyone help me please?
At the left pane, you have a dropdown near the top in which you've currently selected Android. Click on it and select Project. Then you can see the entire directory structure with all your folders. Navigate to your res folder and create new directory like follows. Your project > app > src > main > res > Right Click > New > Android Resource Directory
#Abrar Jahin, The answer by Bidhan A is the correct one. All you have to do for creating a new directory view from android to Project. Below the toolbar like CustomListView->App->.... You can see a tab saying Android click on it. There will be many options like Project, Packages, etc. Select Project, now you will get a entire structure as in Eclipse, Now create a folder, that should see you through.

Why am I not able to create android xml file?

I am creating a new project, target of this project is "GALAXY tab addon". I am creating a new xml file in layout folder an I am getting following screen which was not the case when I was developing for 2.2 or so. Where do I go next, it says the options are "optional" so I skipped them and clicked finish- No Response, I also tried selecting some options and still the file is not creating. What am i missing here?
IDE used is Eclipse.
You dont need to go till this window.you can finish creating xml file before this window like the below image.
Just click on finish button here and your xml file will be created.

Categories

Resources