简体   繁体   中英

gradle.xml not consistent between platforms

I develop using Android Studio on both Macs and PCs, and am seeing undesired behavior when moving projects between the two platforms.

One of those issues is regarding the "gradleHome" value in '.idea/gradle.xml' , which is a correct-looking value on the Mac :

<option name="gradleHome" value="$APPLICATION_HOME_DIR$/gradle/gradle-2.10" />

When I check out the project and load it into Android Studio on Windows, the '.idea/gradle.xml' value for "gradleHome" becomes a hard-coded path:

<option name="gradleHome" value="C:\Program Files\Android Studio\gradle\gradle-2.10" />

Obviously problems will ensue if the file is checked in with a hard-coded path, but there seems nothing I can do but ignore this change during checkin.

Does anyone know why this is happening or how to prevent it? Should I not be checking this file into SVN?

Thanks!

This file should not be checked into version-control. What can go into version-control and defines the gradle-version is this file: gradle/wrapper/gradle-wrapper.properties - I would ignore the whole .idea directory. On a side node - think about using git over svn - if you really need svn as a storage there is git-svn ..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM