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

后端 未结 30 3379
星月不相逢
星月不相逢 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:55

    As of Android Studio 0.8.4 .gitignore file is generated automatically when starting new project. By default it contains:

    .gradle
    /local.properties
    /.idea/workspace.xml
    /.idea/libraries
    .DS_Store
    build/
    /captures
    

    I agree with this statement, however I modify this file to change /build to build/ (This will include /build and /app/build) So I don't end up with all the files in app/build in my repository.

    Note also that if you import a project from Eclipse, the .gitignore won't be copied, or "automagically" created for you.

提交回复
热议问题