Tag Archives: IntelliJ IDEA

Solution to the invalidity of adding. Gitignore to the. Idea directory of IntelliJ idea

The reason is: the corresponding directory or file has been submitted before , and has been tracked by git, so adding. Gitignore is invalid

The following solution is only applicable to this situation, you need to go to the server to verify

Solutions

git rm -rf .idea; 
git commit -m "delete .idea"; 
git push;

If you are prompted that the file has been modified, you can cache it, or directly – f force delete it:

 git rm --cached DayTest.iml;
 git rm -f DayTest.iml;

Confirm to delete the warehouse file

Add more ignore

The solution of “cannot resolve symbol ‘log'” in IntelliJ idea

Front end developers must read! Starting from scratch, teach you to build a low code website platform in stages>>>

solutions to “cannot resolve symbol ‘log'” in IntelliJ idea

Reference article:

(1) The solution of “cannot resolve symbol ‘log'” in IntelliJ idea

(2) https://www.cnblogs.com/alan319/p/8669828.html

Let’s make a note.

[Solved] intellij IdeaCould not autowire. No beans of xxx

Intelligent idea uses @resource or @autowire to report an error, and a red wavy line appears

Although it doesn’t affect the use, it looks very uncomfortable, so the solution is as follows:

Error message:

                 Could not autowire. No beans of '' type found. less... (Ctrl+F1)  Checks autowiring problems in a bean class.

Solution:

                 Settings - Editor - Inspections - Spring - Spring Core - Code - Autowiring for Bean Class removed

Solution of IntelliJ idea running command line is too long [Two Methods]

 

The error information is as follows:

Error running 'xxx':
Command line is too long. Shorten command line for xxx or also for Application default configuration.

Solution (1): Find .idea/workspace.xml under the project and add a line of properties to the tag <component name="PropertiesComponent">:<property name=" dynamic.classpath" value="true" />

<component name="PropertiesComponent">
  Other properties are not changed
  <property name="dynamic.classpath" value="true" />
</component>

Solution (2)

Open the running configuration of the program and change short command line to jar manifest or classpath file , as shown in the figure:

 

IntelliJ idea always prompts no Scala SDK in module solution

Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>

Performance features, project inside the build. Scala anything does not work, prompt a red, so fucked

Open the scala source code in SRC directory and prompt no Scala SDK in module

Then, after setting the SDK refresh dependency, the related Scala Lang package is gone again

If you directly compile Scala files, you will be prompted

W arning:scala : skipping Scala files without a Scala SDK in module(s) systemimport

Try to solve the problem

1) The problem of unloading and reloading the idea Scala plug-in has not been solved

2) The problem of unloading the idea SBT plug-in and reloading it has not been solved

3) Delete the. Idea folder under the project folder. Use idea to import the project again. It’s miraculous

It is also possible that step 1 and step 2 accumulate to take effect, but there is no direct test at the beginning (3)

Performance characteristics

http://stackoverflow.com/questions/4773784/ modulesdk-for-scala-in-intellij-idea

When IntelliJ idea starts, can’t start git will pop up to solve the problem

Detailed map traversal, teach you to master the complex gremlin query debugging method>>>

Phenomenon explanation

Today, when I open idea, a prompt box pops up at the bottom right, as follows:

Can't start Git: /usr/bin/git
Probably the path to Git executable is not valid.

Causes of problems

In order to find the cause of the problem, first of all, you need to open the terminal to confirm whether you can execute git command

sudo /usr/bin/git

The results are as follows

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

However, if you execute the following command, the result will be different:

cd /usr/bin/
git

The results of implementation are as follows:

usage: git [--version] [--help] [-C <path>] [-c name=value]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           <command> [<args>]

These are common Git commands used in various situations:

start a working area (see also: git help tutorial)
   clone      Clone a repository into a new directory
   init       Create an empty Git repository or reinitialize an existing one

work on the current change (see also: git help everyday)
   add        Add file contents to the index
   mv         Move or rename a file, a directory, or a symlink
   reset      Reset current HEAD to the specified state
   rm         Remove files from the working tree and from the index

examine the history and state (see also: git help revisions)
   bisect     Use binary search to find the commit that introduced a bug
   grep       Print lines matching a pattern
   log        Show commit logs
   show       Show various types of objects
   status     Show the working tree status

grow, mark and tweak your common history
   branch     List, create, or delete branches
   checkout   Switch branches or restore working tree files
   commit     Record changes to the repository
   diff       Show changes between commits, commit and working tree, etc
   merge      Join two or more development histories together
   rebase     Reapply commits on top of another base tip
   tag        Create, list, delete or verify a tag object signed with GPG

collaborate (see also: git help workflows)
   fetch      Download objects and refs from another repository
   pull       Fetch from and integrate with another repository or a local branch
   push       Update remote refs along with associated objects

'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.

The above results prove that there is no problem in executing git command in the directory, which may be caused by Xcode problem

Solutions

The following commands can be executed in the terminal:

xcode-select --install

The system will pop up the Xcode plug-in download interface, and the installation will be completed in about 2 minutes.

So far, the problem has been solved

The selected directory is not a valid home for JDK when IntelliJ idea is imported into JDK

  • The JDK version is not compatible with the IDEA version:

Too high JDK version may cause this problem. JDK compatible with IDEA is required.

For example, if IDEA2016.3.8 is used and jdk-10.0.1_windows-x64_bin is used for JDK, this problem will always occur. After re-downloading jdk-8u171-windows-x64.exe and installing it, the problem was solved successfully!

 

How does IntelliJ idea use Maven Tomcat plug to run web projects

First, run – > Edit configurations, as shown in the figure below:

Then click the plus sign in the upper left corner to add a new configuration, as shown in the following figure:

Select maven, as shown below:

Fill in your configuration information below and click apply, as shown in the following figure:

You can see that the information you just configured will appear in the toolbar. You can run the web project by directly clicking run or debug

Question:

No plugin found for prefix ‘tomcat7’ in the current project and in the plugin groups

Change the way to add Maven’s configuration file in pom.xml

<build>     
    <plugins>           
        <!-- java Compiling plug-ins -->
        <plugin>
            <groupId>org.apache.tomcat.maven</groupId>
            <artifactId>tomcat7-maven-plugin</artifactId>
            <version>2.2</version>
            <configuration>
                <!-- Specify the port -->
                <port>9101</port>
                <!-- Request Path -->
                <path>/</path>
            </configuration>                
        </plugin>
    </plugins>
</build>