Use of the Android Studio SVN

Source: Internet
Author: User
Tags tortoisesvn

An SVN configuration

This article uses the Android Studio version for 1.4 RC3.

I chose TortoiseSVN, version 1.8, do not choose version 1.9 (currently the latest version), because if you install the 1.9 version when you configure SVN in studio, you will be prompted with the following error

  

The reason is that studio was developed based on IntelliJ idea, and IntelliJ idea 14.1.4 is currently unable to use svn1.9.0 version.

In addition, when you install TORTOISESVN, command line client tools will not be installed by default and must be manually selected for installation, otherwise you will not be able to do svn affinity configuration in Studio

  

After the installation is done, the studio is associated with SVN and opens the following path in Studio File->settings->version Control->subversion, as shown in:

  

In the use command line client, select the Svn.exe file that you just installed in the SVN path bin directory

Use system default Subversion configuration directory is checked above, this default is checked on the upper, this is the path of the SVN related config information, leave the default path.

Two add ignore file 

The reason to add ignore files or folders is because everyone's studio project configuration will be different, such as the Gradle version. Or some of the files have some important information, such as the configuration of local.properties in the various submissions, this information can not be submitted to SVN, generally need to ignore the files and folders mainly have a few categories:

- . Idea Folder
- . Gradle Folder
-All the build folders
-All . IML Files
- local.properties file

This is also the Android library suggested that we filter the folder.

Add ignore please open the following path: file->settings->version control->ignored files, click on the right of the + sign to add the folder or file path you want to ignore, as shown in:

  

Note: In studio it is only valid to add the Ignore file before the SVN is not associated, that is, this step must be done before vcs->import into Version control->share Project (SubVersion), Otherwise, the added ignore file is invalid.

The next step is to associate SVN, in fact the process has already been said, is to execute vcs->import into Version control->share Project (SubVersion) This option, here need to pay attention to Import Into Version control also has an import into SubVersion this option, these two options are actually different, Share project (SubVersion) This option is only the project with SVN associated operation, Do not submit code, need to complete the connection after the commit code operation, and import into subversion this option is only to submit your SVN project to the SVN, and do not associate, you will find all the project files are turned red, if you are a project initiator , and when you re-submit the modified project will be an error, you are prompted that the project is not a working copy of SVN, unable to submit, if you want to submit a successful, you need to delete the current project, re-import from SVN can be submitted successfully, although both ways, but it is recommended to use share project ( SubVersion) in a way. This article is also submitted using Share Project (SubVersion);

When you click Share Project (SubVersion), the following dialog box appears

  

The current SVN commit path is listed here, if you have not yet clicked the + sign on the top to add a path. Click Share after selecting done

  

Select 1.8format, click OK, success will be found in addition to ignore the other files have become green.

  

So far the location Association has been established, the next step is to submit the code to SVN, select on the top menu bar or right click on the project->subversion->commit Directory ...

  

After completing the commit message, click Commit. There are times when you click Commit and nothing happens, then delete the test folder in your SRC directory and submit again. The exact reason is unclear, and it could be that SVN detects a problem that cannot be committed or is related to the version of Studio.

Now that the project has been successfully submitted to SVN, you can work with SVN to develop it.

Addition or modification of three individual files

It's easy to right-click on the->subversion->commit file on the files that need to be manipulated.

Use of the Android Studio SVN

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.