1

I have Android Studio 1.5.1 installed on two different computers. I'm using SourceTree and BitBucket to handle VCS on a project. Every time I push or pull the file and then open it on a different computer, Android Studio updates .idea/gradle.xml, .idea/misc.xml, and app/app.iml and makes changes.

On .idea/gradle.xml my PC has this line

<option name="gradleJvm" value="1.8" />

while on my laptop I get

<option name="gradleJvm" value="1.7" />

Same thing on misc.xml, project-jdk-name goes from 1.8 to 1.7. app.iml has a bunch of changes I don't really understand.

It feels like I just need to get my laptop updated to 1.8, but I updated Android Studio and I ran the SDK manager and updated everything it seemed to think needed an update. Clearly this is just user error and I have no idea what I'm supposed to be updating now. Can someone point me in the right direction? SourceTree is getting really grumpy with me because it doesn't like to pull down the other version when these background files have been changed.

Jeff McAleer
  • 354
  • 2
  • 12

1 Answers1

1

All files under the .idea folder are the local IDE configuration and should be added to .gitignore on both machines. Also you can delete them safely.They will be regenerated after every build. Also you may refer to this question.

Also for preventing git from tracking specified folders in your project you may take a look at this question.

Community
  • 1
  • 1
Farhad
  • 12,178
  • 5
  • 32
  • 60
  • I have the .gitignore that was generated by default by either Android Studio or Source Tree (I don't know which). I've never touched it before. This is whats in it .gradle /local.properties /.idea/workspace.xml /.idea/libraries .DS_Store /build /captures Beyond just adding the entire .idea folder to it, is there anything else I need to be worrying about adding? – Jeff McAleer Feb 17 '16 at 21:23
  • simply add .idea/* and .idea/ to the gitignore file – Farhad Feb 17 '16 at 21:24