Android Studio SVN usage, androidsvn

Source: Internet
Author: User
Tags tortoisesvn

Android Studio SVN usage, androidsvn

I. SVN Configuration

The Android studio version used in this article is 1.4 RC3.

I chose TortoiseSVN with version 1.8. Do not select version 1.9 (the latest version ), if you have installed version 1.9, the following error will be prompted when you configure svn in studio:

  

The reason is that studio is developed based on Intellij IDEA, while Intellij IDEA 14.1.4 cannot use svn1.9.0.

In addition, when you install TortoiseSVN, command line client tools will not be installed by default. You must manually install them. Otherwise, svn Association configuration cannot be performed in studio.

  

After installation, associate studio with svn. Open the following path in studio: File-> Settings-> Version Control-> Subversion, as shown in:

  

In Use command line clientselect the svn.exe file under the svn.exe directory you just installed.

Use system default Subversion configuration directory is checked. This is checked by default. This is the path of svn-related configuration information. Keep the default path.

2. Add ignore files 

The reason for adding ignore files or folders is that everyone's studio project configuration is different, such as the gradle version. Or some files save some important information, such as local. the submission information configured in properties cannot be submitted to svn. Generally, the files and folders to be ignored mainly include the following types:

-. IdeaFolder
-. GradleFolder
-AllBuildFolder
-All. ImlFile
-Local. propertiesFile

This is also the folder recommended by the Android library.

To add ignore, open the following path: File-> Settings-> Version Control-> Ignored Files. Click the plus sign on the right to add the folder or File path you want to ignore, as shown in:

  

Note: In Studio, ignore files are added only before SVN is associated. That is to say, this step must be performed before VCS> Import into Version Control> Share Project (SubVersion, otherwise, the added ignore file is invalid.

The next step is to associate svn. As mentioned in the previous step, run the "VCS-> Import into Version Control-> Share Project (SubVersion)" option, note that there is an Import into Subversion option under Import into Version Control. The two options are actually different. Share Project (SubVersion) this option only associates the project with SVN and does not submit the code. You need to complete the connection before submitting the code; the Import into Subversion option only submits your svn project to svn and does not associate it. After the execution, you will find that all the engineering files have changed to red, if you are a project initiator and an error occurs when you submit the modified project again, the system prompts that the project is not a working copy of svn and cannot be submitted. If you want to submit the project successfully, you need to delete the current project and import it from svn again. The submission can be successful. Both methods are acceptable, but the Share Project (SubVersion) method is recommended. This article also uses the Share Project (SubVersion) method for submission;

Click Share Project (SubVersion). The following dialog box is displayed.

  

The submission path of the current svn is listed here. If you haven't clicked the plus sign to add the path, you can. Click Share after selection.

  

Select 1.8 format and click OK. After the operation is successful, all files except the ignored files are green.

  

By now, the location Association has been established. The next step is to submit the code to svn, right-click on the top menu bar or right-click the project-> SubVersion-> Commit Directory...

  

Enter the commit message and click commit. Sometimes you Click commit without any response. Delete the test folder in your src directory and submit it again. The specific cause is unclear. It may be that the svn check fails to be submitted, or it may be related to the maxcompute studio version.

The project has been successfully submitted to svn. You can use svn for cooperative development.

Add or modify three files

You can simply right-click the File you want to operate on and choose Subversion> Commit File.

 

Related Article

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.