[Update]:Save settings of Android studio - android

I am new to Android Studio IDE i want to share my project in SVN.Everything was fine i ignored files and then committed by project.Then i try to check out the project and open in Android Studio IDE but the problem i lost the settings in android studio i knew i ignore some files that contains this settings.Can anyone help me on the file that need to commit so that i can restore the settings.The following settings are missing.

dont ignore .gradle!
project settings usually reside in .iml (IDEA markup language I believe), those are settings for the IDE.
More broad and user based settings live und .idea/, usually you dont want have them in your source repository.

Related

What file(s) contain project settings for Android Studio 2.2?

I'm new to Android development (and to gradle), as is our small team. We have one developer who has been working on a project for a couple weeks, and who has been checking their code into GitHub periodically.
When I download their code and attempt to open in Android Studio 2.2, I get asked about various project settings. This surprised me, because it seems that all the project settings should already be specified somewhere in a file saved in the project settings. My coworker ought to be able to save all of their project configuration settings into the project file, upload it to the repository, and I should be able to download all of his files and simply build and run the project on my machine, assuming we're running the same version of Android Studio and both have the same SDK(s) installed.
My question is, what file(s) contain the project settings under Android Studio 2.2 and 2.1 (the version he started development with)? I've tried searching online and here on stack overflow for "what file contains project settings in android studio". However, this only gets me results that talk about what a project is, and what dialog boxes contain certain settings. I'd like to know which files (gradle, xml, etc) files contain the project settings (build, SDK, workspace, etc).
I've also tried uninstalling 2.2 and going back to 2.1.2, but that doesn't help much either. In both cases, I'm getting questions about project settings as well as build errors. I don't want to address all of those issues here though.
Thanks so much for you help!
From the location where you have installed Android Studio,
you will have something like .AndroidStudio2.2 folder this contains settings for version AndroidStudio2.2
What you do is Unistall studio and installng new one(AndroidStudio2.2), it will ask you to take settings from just give this path mentioned.
Other than this,
your gradle file will have all settings of your project.
it will be of module level and project level.

Android Studio integration with GitHub failing to upload project files apart from MainActivity.java

I have recently created a new Android application and have used its VCS to integrate with GitHub. My problem is that although the integration appears to work, the only file in my Android application that has been saved to GitHub is MainActivity.java. I have tried to add files into GitHub but via the Website but this fails as there are too many files and it doesnt allow Folders to be added.
Has anyone else had this issue?
It's frustrating as when I make changes to MainActivity.java it gets saved and committed/pushed okay but the VCS in Android just doesn't see the other files I have changed such as the content_main.xml which I changed to see if it would then be added to GH.
I cannot seee how to add files within Android Studio to GH via VCS. Does anyone have any pointers where I may start? Thanks!
NB I have had a look through existing questions but none address my issue as far as I can tell.
Usually when you start a new project, Go on VCS -> Enable Version Controle Integration.
Then you should have the Version Control accessible on the Bottom Left of the IDE.
In the tab Local Changes, you will see Default and Unversioned Files.
Just take files from Unversioned Files to Default to start to track them.
To my shame once I checked Xiaomis suggestion I could see that my git was pointing to a directory lower than my /app directory. I tried to change in in my GitHub shell but was unable to do this as GitHub Desktop shell didn't recognise the new directory.
To fix my muddle I deleted my original repo and delted the .gitignore file and other git files from my Android project folder. I then opened Android Studio and went through the process of creating a new repo from there, circumventing GitHub entirely. This worked and enabled me to select my /app directory as the Git root.
Thanks go to Xiaomi who's suggestion made me notice that git was looking at the wrong root. Live and learn!

Android Studio Project Files are Missing

I was working on app and it was opened in Android Studio. It was all perfect but when after some browsing i clicked on android studio window. it says there are no files opened.
and when I checked in file explorer, all of my project files are removed except .idea folder.I did spend a lot of days on it. I cannot let this happen to me. what possible solutions of this problem?
I tried windows folder recovery, no benefit.
File > Invalidate Caches & Restart seems to be the solution for most oddities.
Before trying any thing. Back-up the project you have.
You can look through local history in Android Studio. In Android Studio -> VCS(Menu) -> Local History -> show History
Select an early restore point that includes your sources-> right mouse -> Revet
strongly I'd recommend you to use git to avoid such as situation. The code is Our Precious👽 Don't lose it.🙂
Just make a copy of the project and save it to another location and open it from the new location. Build it again and it will work.

Android Studio move project from Eclipse to SVN

I have been developing an Android project on Eclipse and have used SVN with tortoise to backup the project.
I have recently moved to Android Studio and imported the project from Eclipse. I have also made extensive edits in Android Studio.
Now I want to use SVN on Intellij. I have looked for help on setting up SVN on Intellij and committing the updated files.
I have not been able to find basic help on doing this. What I have found is information that assumes you know all there is to know on SVN, setting up Intellij and committing edits. My knowledge is scratchy so any help would be appreciated.
You can enable Subversion integration in Settings | Version Control. Once you do that, you will see the list of the files you've modified in the Changes view (you can use VCS | Show Changes View to display it easily). From there, you commit changes by selecting specific files or an entire changelist and invoking the "Commit Changes" action from the context menu.
You can find a basic introduction on working with version control in IntelliJ IDEA here.
If you have made changes in a directory which was not controlled by Subversion, then you need to check out your Subversion repository to a separate clean directory (VCS | Check out from version control | Subversion, see here for more details), then copy the changed state of your project to the directory you've checked out (overwriting all the files there). Then you'll be able to commit your changes as described above.

How do you turn off version control in android studio?

I set up my Github with android studio, everything worked fine, the problem now is though, that I can't seem to turn off, or get out of version control to use the IDE normally again.
This means that errors aren't shown, and it is really hard to debug because of this.
So how do I turn off version control (VCS) in Android Studio?
To disable VCS in Android Studio on a Mac do the following:
Android Studio > Preferences...
In the Preferences window, select Version Control and under Directory choose VCS dropdown to be <none>
Don't forget to click "Apply" in the general Preferences buttons at the bottom.
For 2022...
It would seem that Android Studio nowadays does not automatically start with version control turned on for a new project.
The default seems to be "off" at the beginning of a new project.
(It does conveniently make a ".gitignore" file for you but it does not default to trying to use version control.)
However, if later you do manually yourself start using git in the folder in question, Studio does turn on vcs inside Studio, i.e. exactly as seen in the image above. In that case you'll have turn it off inside Studio, exactly as shown above.
In Android Studio 1.2.x
FILE -> SETTINGS -> VERSION CONTROL
Here the root is shown, Press (-) button to delete.
The other answers weren't working for me, so I am adding my solution.
This message was driving me crazy:
I had trouble with the other suggestions, as my settings was not allowing me to save changes for version control none.
So I went into Version Control / Ignored Files and removed all ignored files for that project.
Then when I clicked back on Version Control
I found this in this answer here.
VCS is a project specific setting which you can modify by going to File -> Settings then checking under the Version Control heading.
Alternatively, you could disable a specific VCS plugin under the Plugins heading.
Note: I have not used GitHub as VCS, but you should still be getting error display (syntax checking) in the IDE. VCS usage should not disable that, since that would make the use of an IDE completely pointless.
You can delete vcs.xml file and it will remove the VCS connected with your app. 'vcs.xml' file can be found in this location "YourProject\ .idea\vcs.xml"
Project > .idea > vcs.xml
change vcs value to 'none'
Note : only current enabled project.

Categories

Resources