我从IntelliJ创建了一个mave项目,并在 pom.xml 中添加了项目所需的依赖项,如下所示
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.kenshinji</groupId>
<artifactId>githubtools</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.kohsuke</groupId>
<artifactId>github-api</artifactId>
<version>1.75</version>
</dependency>
</dependencies>
</project>
IntelliJ告诉我它无法解析方法名称,它可以解析我导入的Class I.
我尝试从IntelliJ“无效缓存/重启......”并重新导入我需要的库。它不起作用。