What should be in my .gitignore for an Android Studio project?

后端 未结 30 3361
星月不相逢
星月不相逢 2020-11-22 04:23

What files should be in my .gitignore for an Android Studio project?

I\'ve seen several examples that all include .iml but IntelliJ docs sa

30条回答
  •  礼貌的吻别
    2020-11-22 04:56

    This is created using the reference of http://gitignore.io/ Where you can create the latest updated gitignore file for any project. For Android http://gitignore.io/api/androidstudio. Hope this helps. Currently I am using Android Studio 3.6.3

    # Created by https://www.gitignore.io/api/androidstudio
    # Edit at https://www.gitignore.io/?templates=androidstudio
    
    ### AndroidStudio ###
    # Covers files to be ignored for android development using Android Studio.
    
    # Built application files
    *.apk
    *.ap_
    
    # Files for the ART/Dalvik VM
    *.dex
    
    # Java class files
    *.class
    
    # Generated files
    bin/
    gen/
    out/
    
    # Gradle files
    .gradle
    .gradle/
    build/
    
    # Signing files
    .signing/
    
    # Local configuration file (sdk path, etc)
    local.properties
    
    # Proguard folder generated by Eclipse
    proguard/
    
    # Log Files
    *.log
    
    # Android Studio
    /*/build/
    /*/local.properties
    /*/out
    /*/*/build
    /*/*/production
    captures/
    .navigation/
    *.ipr
    *~
    *.swp
    
    # Android Patch
    gen-external-apklibs
    
    # External native build folder generated in Android Studio 2.2 and later
    .externalNativeBuild
    
    # NDK
    obj/
    
    # IntelliJ IDEA
    *.iml
    *.iws
    /out/
    
    # User-specific configurations
    .idea/caches/
    .idea/libraries/
    .idea/shelf/
    .idea/workspace.xml
    .idea/tasks.xml
    .idea/.name
    .idea/compiler.xml
    .idea/copyright/profiles_settings.xml
    .idea/encodings.xml
    .idea/misc.xml
    .idea/modules.xml
    .idea/scopes/scope_settings.xml
    .idea/dictionaries
    .idea/vcs.xml
    .idea/jsLibraryMappings.xml
    .idea/datasources.xml
    .idea/dataSources.ids
    .idea/sqlDataSources.xml
    .idea/dynamic.xml
    .idea/uiDesigner.xml
    .idea/assetWizardSettings.xml
    
    # OS-specific files
    .DS_Store
    .DS_Store?
    ._*
    .Spotlight-V100
    .Trashes
    ehthumbs.db
    Thumbs.db
    
    # Legacy Eclipse project files
    .classpath
    .project
    .cproject
    .settings/
    
    # Mobile Tools for Java (J2ME)
    .mtj.tmp/
    
    # Package Files #
    *.war
    *.ear
    
    # virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml)
    hs_err_pid*
    
    ## Plugin-specific files:
    
    # mpeltonen/sbt-idea plugin
    .idea_modules/
    
    # JIRA plugin
    atlassian-ide-plugin.xml
    
    # Mongo Explorer plugin
    .idea/mongoSettings.xml
    
    # Crashlytics plugin (for Android Studio and IntelliJ)
    com_crashlytics_export_strings.xml
    crashlytics.properties
    crashlytics-build.properties
    fabric.properties
    
    ### AndroidStudio Patch ###
    
    !/gradle/wrapper/gradle-wrapper.jar
    
    # End of https://www.gitignore.io/api/androidstudio
    

提交回复
热议问题