Add existing Android Studio project to VSTS

2019-02-15 00:05发布

I have an existing Android project developed in Android Studio using Kotlin. It's not yet under version control. I'd like to add it to Visual Studio Team Services in a new classic TFVC project, not a Git project. Can anyone explain how to do this, or point me to a tutorial?

I have installed the Team Services plugin and configured the TF executable, but now I'm going around in circles trying to associate my project with a new or existing TFVC project. I see an option to import into a Git TFS project, but nothing for TFVC. Nothing seems to quite do what I need.

Any pointers?

1条回答
Animai°情兽
2楼-- · 2019-02-15 00:09

After install the team services plugin, you should also install TF command line tool:

Download TFF_CLC-14.*.*.zip (TFF_CLC_14.120.0.zip for now) -> extract the .zip file in a certain directory -> in commandline/terminal -> cd to the extract files -> tf eula -> finish reading -> press y.

More detail steps, you can refer TFVC support.

Then configure the TF in android studio:

File -> settings -> version control -> TFVC -> select the file tf.cmd (for windows) in the path that you extract -> test to check if it’s valid -> OK.

enter image description here

Now you have configure the TFVC VCS totally in android studio.

For android studio, it can’t import project into VSTS TFVC repo directly. As you found, it can just import into VSTS Git repo.

You should checkout from VSTS TFVC repo (VCS -> checkout from version control -> team services TFVC). For MAC OS, the TFVC options/commands in android studio can use used. But unfortunately, for windows OS, it can only checkout TFVC repo, the TFVC options/commands is not available. If you are using windows OS, you can feed back the issue in android studio -> help -> submit feedback.

The work around for now is that you can config and map the TFVC repo in visual studio, then copy your android projects in the map directory and then add them in source control, finally checkin the changes to VSTS. Details steps as below:

1. Connect with VSTS project

VS -> team explorer -> manage connections -> connect to team project -> input your VSTS credential -> select the VSTS project -> connect.

enter image description here

2.Config and map TFVC repo locally

Configure workspace -> select a local path -> Map & Get.

enter image description here

3. Add android project to source control

Copy the android project to the local map path (in above step) -> VS -> source control explorer -> make sure the workspace and local path are correct -> add items to folder -> select the project you copied -> finish.

enter image description here

4. Checkin changes to VSTS

Team explorer -> pending changes -> (add comment) -> checkin.

Now the android studio project is added to VSTS.

查看更多
登录 后发表回答