This translation from: the What Should BE AN in My .gitignore for Android Studio Project?
My Files Should BE in the What .gitignore
for AN Android Studio Project? Android Studio project .gitignore
file which should contain the file?
Examples that 'several''ve Seen the I All the include .iml
But IntelliJ docs say that .iml
the MUST BE included in your Source Control. I've seen a few contain .iml
examples, but IntelliJ document says .iml
must be included in the source code control.
#1st Floor
Reference: -gitignore https://stackoom.com/question/18E1I/Android-Studio what projects should be
#2nd Floor
Basically any file that is automatically regenerated. Basically, any automatically re-generated files.
A good test is to clone your repo and see if Android Studio is able to interpret and run your project immediately (generating what is missing). A good test is to clone your warehouse to see if Android Studio can immediately interpret and run your project (to generate the missing content).
Not IF, the What IS the Find Missing, and the make the Sure IT IS not ignored, But added to at The repo. If not, look for the missing content, and make sure not to ignore it, but add it to the repository.
Being of Said That, you CAN ON the Take Example existing .gitignore
Files, like at The Android One . Having said that, you can in the existing .gitignore
example on the file, such as Android One .
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated files
bin/
gen/
# Local configuration file (sdk path, etc)
local.properties
# Eclipse project files
.classpath
.project
# Proguard folder generated by Eclipse
proguard/
# Intellij project files
*.iml
*.ipr
*.iws
.idea/
#3rd floor
I use this .gitignore. I use this .gitignore. AT IT I found the I: http://th4t.net/android-studio-gitignore.html I found it in the following locations: HTTP : //th4t.net/android-studio-gitignore.html
*.iml
*.iws
*.ipr
.idea/
.gradle/
local.properties
*/build/
*~
*.swp
#4th floor
In the case of Android Studio, the only files that are required to be saved in version control are the files required to build the application from the command line using gradle. For Android Studio, the only file needs to be saved in version control is to use gradle files needed to build the application from the command line. So you can ignore: Therefore, you can ignore:
- * .iml * .iml
- .idea . idea
- build build
However, if you save any IDE settings , such as custom code style settings, they get saved in the .idea folder. However, if you save any IDE settings (such as custom code style settings), they will be saved in the folder .idea . If you want those changes in version control , then you'd save the IDEA files as well (* .iml and .idea). If you want to make these changes in version control, you also need to save the IDEA file (* .iml and. idea).
#5th Floor
Depends on how your project format is maintained : it depends on maintenance mode project format:
You have two options: You have two options:
- Format-based Directory (by You by Will have have A
.idea
Folder Which the contains specific at The Project Files) based on the format of the catalog (you will have a.idea
folder that contains project-specific files) - The format-based File (Configuration Files are
.iws
and.ipr
) based file format (file configuration.iws
and.ipr
)
Ref: http://www.jetbrains.com/idea/webhelp/project.html Reference: HTTP : //www.jetbrains.com/idea/webhelp/project.html
Files committed to version control depends on the above: committed to the file version control depends above:
- .Idea Folder Version Control to the include, the exclude
workspace.xml
andtasks.xml
include .idea folder to version control, exclusionworkspace.xml
andtasks.xml
- Control Version
.ipr
File and All at The.iml
Module Files, the exclude at The.iws
File specific AS IT Stores the User Settings. Versioned.ipr
files and all.iml
the module file does not include the.iws
file because it stores user-specific settings.
Ref: https://intellij-support.jetbrains.com/entries/23393067 Reference: HTTPS : //intellij-support.jetbrains.com/entries/23393067
#6th floor
My advise would be also to not ignore the .idea folder. My advice is not to ignore .idea folder.
I've imported a Git-based Eclipse project to Android Studio and that went fine. I have imported Android Studio based on the Eclipse Git project, everything is normal. Later, I wanted to import this project with Git (like the first time) to another machine with Android Studio, but that did not worked. Then I want to use this project with Git introduced together (as with the first) to have Android Studio on another computer, but to no avail. DID the Load at The Studio All Android Files But WAS not of Able to 'See' at The Project AS A Project. Android Studio really load all the files, but they can not project "as" project. I only could open Git-files. I can only open the Git file.
While importing the project for the first time (from Eclipse to Android Studio) my old .gitignore was overwritten and the new one looked like this: first import project (from Eclipse to Android Studio) when my old .gitignore covered, new the .gitignore follows:
- .idea/.name .idea / .name
- .idea/compiler.xml .idea / compiler.xml
- .idea/copyright/profiles_settings.xml .idea / copyright / profiles_settings.xml
- .idea/encodings.xml .idea / encodings.xml
- .idea/libraries/libs.xml .idea / libraries / libs.xml
- .idea/misc.xml .idea / misc.xml
- .idea/modules.xml .idea / modules.xml
- .idea/scopes/scope_settings.xml .idea / scopes / scope_settings.xml
- .idea / vcs.xml .idea / vcs.xml
- .idea/workspace.xml .idea / workspace.xml
So, I tried to use an empty gitignore and now it worked. So I try to use empty gitignore, now it it. The other Android Studio could load the files and the Project. Another Android Studio can load files and projects. Files are not some GUESS the I Important (profiles_settings.xml)
for Git and Importing But the I AM the Just Happy IT worked. I guess it does not matter for some files and import Git (profiles_settings.xml)
, but I'm glad it works.