Intellij idea: jar package, assets, Maven, git

Source: Internet
Author: User

Due to work needs, eclipse and idea have been discarded in the past few days. After a few days, idea is indeed more convenient in some places, but it is quite troublesome. In addition, there are not as many documents on the Internet as eclipse, and many of them are resolved on their own. So I want to post a post to summarize the problems and record them.


1. jar package. Import a project. Jar packages in libs are available, but cannot be found in the Code. This is fairly simple. Right-click the jar package and select "Add as library. You can also add it to libraries in Project Settings (right-click Project menu Open Module setting.


2. Assets folder. This folder was not selected when the project was created and was later required. After creating a new file, a problem occurs. This folder cannot be found. The right-click menu contains "make directory as...", which does not work after one try. Solution: Under "modules" in Project Settings, reset assets directory in the "android" tab of the corresponding project. Of course, the settings of other folders can also be seen here. If there is a similar problem, the processing method is the same.


3. The location of the maven local repository is changed. Idea can use maven. Although you do not need to install the plug-in, you also need to install Maven before setting it. After installing Maven, you can set Maven in Maven under settings of idea to use Maven. Be sure to pay attention to the location of the local repository. If the location is a custom local repository, make sure that the idea settings are correct. In particular, the local repository location has been changed during the use process. When creating or re-opening a Maven project, make sure to confirm it, because it is likely that the configuration will automatically change back to the previous location. The reason should be that idea saves the corresponding configuration. The configuration file is located at c: \ Users \ {username }\. ideaic13 \ System \ Maven \ indices has multiple index folders, each of which has an index. properties file. This configuration file stores the location of the local repository. After modification, it should not be automatically changed back to the previous location.


4. MAVEN Android project. When creating a project in idea, you can see many items, including creating a Maven project. However, the created project is only a common Java project, not an android project. When creating an android project, you can only create gradle or normal projects, but you do not have the option to directly create a Maven project. In fact, it is very simple. After creating a common android project, right-click the project and choose "add framework support..." to add Maven support. In this way, a Maven Android project is created, and the android project file distribution is automatically changed to Maven.


5. Version Control: git and SVN. Idea can also use git, SVN, and other version control tools. The configuration methods are basically the same. Take git as an example. After git is installed, you can configure multiple control tools under settings-> Version Controlin idea. The master must set exe, such as git.exe. (When svnis installed, the installation will be less than one, and svn.exe will be in that module, so install it as much as possible during installation.) After setting it, you can use the corresponding tool under "VCs" on the menu bar.



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.