Android Studio: SDK location changes for same project using Mac (OSX) and Windows

前端 未结 1 1274
离开以前
离开以前 2021-01-20 22:01

I am working on an Android Studio project where my team members use Windows and I use OSX.

The problem is that when I pull new code from git and then open the projec

1条回答
  •  一个人的身影
    2021-01-20 22:15

    Inside the project you will find some Android Studio files, for example the .idea and the iml files inside each module.
    Check also this answer for more details.

    These resources contain local paths and references and you should exclude them (the .idea folder and iml files) from your git repo.

    It is an example of .gitignore we are using with Mac, Linux and Windows users.

    #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
    
    # Windows thumbnail db
    Thumbs.db
    
    # OSX files
    .DS_Store
    
    # Eclipse project files
    .classpath
    .project
    
    # Android Studio
    *.iws
    *.iml
    .idea
    .gradle
    build/
    */build/
    

    If these files are in git repo, you should remove them from the remote repo, and then rebuild the local projects.

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