Because of the need to work, these days began to abandon eclipse, change idea. In a few days, idea did have some places that were more convenient. But there's a lot of trouble. and the corresponding information on the Internet and not so much of eclipse, very many are their own to solve, so want to get a post to summarize the problems encountered. Make a note.
1, jar package. Import a project,libs under the jar package, but the code is not found. It's a simple one. Select the jar package right-click. There is an "add as library.", you can.
You can also add libraries in the project settings (Project right-click menu Open Module setting).
2, Assets directory. This directory was not selected when the project was created. Then I need it again.
After the new one is put into the file, there is a problem and the directory cannot be found. There is "make directory as." In the right-click menu, and it doesn't matter whether you try it or not. Workaround: Under "Modules" in the project settings, the corresponding item is in the "Android" tab. Set up assets directory again.
Of course, you can also see other directory settings, assuming similar problems are handled the same way.
3, MAVEN local warehouse location change. Idea is able to use Maven, although there is no need to install a plugin, but it also needs to be set up after Maven is installed. After installing MAVEN. Maven can be used with the relevant settings in Maven under Idea's settings. Be sure to pay attention to the location of the local repository, assuming that your local warehouse location is defined, then make sure that the idea is set up correctly. In particular, the use of the process has changed the location of the local warehouse. When you create a new MAVEN project or open it again, be sure to confirm that it is possible to set yourself back to the previous location. As for the reason. It should be that idea saved the corresponding configuration, and the configuration file location is c:\users\{username}\. Ideaic13\system\maven\indices, there are multiple index directories, and there is a index.properties file under each directory. The location of the local repository is saved in this configuration file. After the change, you should not be able to take the initiative to change back to the previous position.
4. Maven's Android project.
(1) Create a new MAVEN Android project.
Idea New project will see a lot of options, and Maven's template will appear on the right when Maven is selected. At this point, if you do not select any template, a normal Java project will be created. If you want to create an Android project, tick the top create from archetype and select "Android-quickstart" in the template, which will create an Android project with Maven.
No "Android-quickstart"? Look for the MAVEN Central warehouse (de.akquinet.android.archetypes ? Android-quickstart). Then in the "New Project" interface to the right of "add archetype ...", you can add the template to it.
(2) Join MAVEN support for an existing Android project. Assume that you have an existing Android project. How to join Maven. You do not have to create a new project. There is an "Add framework support:" Under the right-click menu of the project, where you can join Maven. This joins MAVEN. And will take the initiative of the Android project part of the file structure into maven. Note here that the project file structure in this way is somewhat different from the structure created by (1). So some of Maven's features aren't very well implemented.
For example: Maven relies on a apklib that creates a "gen-external-apklibs" on its own initiative in a project created in (1) and puts the dependency package in, but in a project (2) It does not create an import on its own initiative. Causes the dependency package to not be found.
5, version number control git, svn and so on. Idea can also use version number control tools like Git and SVN, and the configuration method is basically the same, with Git as an example.
After installing Git, the settings->version control of idea is the setting of each version number controlling tool, mainly setting the main EXE, for example Git.exe. (When installing SVN, be aware that the default installation will be one less module.) And Svn.exe is in that module, so install as far as possible all installed) after the menu bar "VCS" can use the corresponding tool.
IntelliJ idea problem Summary of a--jar package, assets, maven, git