Ideal Android Studio gitignore file

后端 未结 1 2036
Happy的楠姐
Happy的楠姐 2021-02-01 22:56

i recently created an Android project but it is my first time to work with Android Studio, i placed the project in a Git folder to be able work with another developer remotely t

1条回答
  •  爱一瞬间的悲伤
    2021-02-01 23:15

    As for me, ideal gitignore file is:

    ### Android ###
    # Built application files
    *.apk
    *.ap_
    
    # Files for the Dalvik VM
    *.dex
    
    # Java class files
    *.class
    
    # Generated files
    bin/
    gen/
    
    # Gradle files
    .gradle/
    build/
    
    # Local configuration file (sdk path, etc)
    local.properties
    
    # Proguard folder generated by Eclipse
    proguard/
    
    # Log Files
    *.log
    
    # Android Studio Navigation editor temp files
    .navigation/
    
    ### Android Patch ###
    gen-external-apklibs
    
    
    ### Java ###
    *.class
    
    # Mobile Tools for Java (J2ME)
    .mtj.tmp/
    
    # Package Files #
    *.jar
    *.war
    *.ear
    
    # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
    hs_err_pid*
    
    
    ### Intellij ###
    # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
    
    *.iml
    
    ## Directory-based project format:
    .idea/
    # if you remove the above rule, at least ignore the following:
    
    # User-specific stuff:
    # .idea/workspace.xml
    # .idea/tasks.xml
    # .idea/dictionaries
    
    # Sensitive or high-churn files:
    # .idea/dataSources.ids
    # .idea/dataSources.xml
    # .idea/sqlDataSources.xml
    # .idea/dynamic.xml
    # .idea/uiDesigner.xml
    
    # Gradle:
    # .idea/gradle.xml
    # .idea/libraries
    
    # Mongo Explorer plugin:
    # .idea/mongoSettings.xml
    
    ## File-based project format:
    *.ipr
    *.iws
    
    ## Plugin-specific files:
    
    # IntelliJ
    /out/
    /captures
    
    # mpeltonen/sbt-idea plugin
    .idea_modules/
    
    # JIRA plugin
    atlassian-ide-plugin.xml
    
    # Crashlytics plugin (for Android Studio and IntelliJ)
    com_crashlytics_export_strings.xml
    crashlytics.properties
    crashlytics-build.properties
    

    Also you can use awesome service: https://www.gitignore.io/

    0 讨论(0)
提交回复
热议问题