How to Use TFS in Android Studio

早过忘川 提交于 2019-11-29 12:14:49

Please double check if you have follow below steps:

You must have the TF command line tool installed to be able to use TFVC features. The minimum version supported by the plugin is 14.0.3. To install the tool, download the latest "TEE-CLC-14...zip" file and extract it to a known location. After extracting the files, you must accept the license agreement. To do so, open a Command Prompt/Terminal window, navigate to the extracted directory, and run tf eula. After reading the EULA, enter y enter code hereto accept it. NOTE: If you forget to do this, the plugin may fail to load with a RuntimeException.

For the tool to be detected by the plugin, you must set the location of the executable in the Settings/Preferences menu by following these instructions:

  1. Go to RD Settings Version Control -TFVC
  2. In the Path to tf executable text field, navigate to the location of the tf executable.

  3. Click Test to test that the executable has been found and is working as expected.

  4. Click Apply then OK to save and exit.

More details please refer this tutorial.

I had to do a couple of things to make this work.

I was following this video and it selects 'tf' as executable. I'm using Windows so I had to select tf.cmd as executable. Getting Started with TFVC inside of Android Studio with the Team Services Plugin

Also I had _JAVA_OPTIONS set in environment variables so when Android Studio was testing tf executable, the first response was:

Picked up _JAVA_OPTIONS: -Xms512m -Xmx2048m

After I removed _JAVA_OPTIONS from environment variables tf executable was accepted.

Going through debuglog Android Studios debuglog was pretty useful to understand the issue: How do I collect logs to help troubleshoot an issue?

Also I ended up modifying tf.cmd according to this. Seems to work so I'm going to let it be. https://github.com/Microsoft/vso-intellij/issues/45

This was due to the heap memory. By default there in the tf.cmd you are starting the tool by requesting a heap of 2048MB. This is too much for certain machine (as in my case). I changed the -Xmx param to 512 and now is all working fine.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!