Why am I not able to create android xml file? - android

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.

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 !

Android Studio turn my files into gibberish. Cannot load settings from file warrning

Files gets turned red on the project tree structure, when opening them they turn into gibberish, Undo or revert does not work.
Portion of my XML and Java files turned red, when opening them i had the privilege to see my source code like that:
�PNG
IHDR �s� IDATx^�1��0E_B�6 W�.�-�Q�a�i�H�"b{6!�DNl�-�++��ߑgԷ��"URD�%�ڰ��і���㎡�
��pg�������ˍ5P�5���BC=�h���W�
���/��O8��Ιp��U��^']�ԱO��ۏ�Y��
����Ox�w
m���L��v��_/vI��M��O��]R8:E0��<^��>�) �����L UZ39,v�X�{�s�#�i�C5����YI�� IEND�B`�
Cannot Load settings from file warrning is being displayed.
Files gets restored to the original after deleting the following folders and restarting:
C:\Users\user_name\.android
and
C:\Users\user_name\.android_studio3.4
This is a PNG file. You've potentially got filesystem/disk corruption problems.

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.

Adding new image to Xamarin Android changes all other images

I'm new to Xamarin and I'm facing strange issue that whenever i try to add new image to Resources/drawable folder of Android and referring it to shared code,all other images are getting change and starts referring random images.
Steps which I'm following :
Add a new Image to Resources/drawable folder.
Change Build Action to "AndroidResources".
And referring the new image in Source attribute.
thanks in advance.
Looks like your Android resource generated file was not re-generated or broken. Try Clean-Build Android project. If that doesn't help, delete bin and obj folders and try building again.

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.

Categories

Resources