我对Intellij Idea有问题。IDE在作为maven项目导入时坚持"寻找可用的概要文件-读取pom.xml",Integlij在原始项目中也坚持读取pom。我尝试过通过控制台mvn clean install
构建项目,它…工作得很好,构建项目时没有错误,但在Intellij中依赖类仍然无法导入,并且在代码中显示为红色。我不知道这是否有帮助,但我正在使用OSx-yosemite的mbp。
项目可以在github上找到:github 上的wykop脱机
重新启动Ide/计算机对没有帮助
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.mierzejewski.wykopoffline</groupId>
<artifactId>wykop-client</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>apk</packaging>
<properties>
<!-- use UTF-8 for everything -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<sdk.path>/Users/dom/Desktop/adt-bundle-mac-x86_64-20140624/sdk</sdk.path>
</properties>
<!--<repositories>-->
<!--<repository>-->
<!--<id>jitpack.io</id>-->
<!--<url>https://jitpack.io</url>-->
<!--</repository>-->
<!--</repositories>-->
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.2.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.2.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.2.3</version>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.mcxiaoke.volley</groupId>
<artifactId>library</artifactId>
<version>1.0.16</version>
</dependency>
<dependency>
<groupId>com.mikepenz.materialdrawer</groupId>
<artifactId>library</artifactId>
<version>3.0.9</version>
<scope>system</scope>
<type>aar</type>
<systemPath>${project.basedir}/libs/materialdrawer-3.0.9.aar</systemPath>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.9.0-rc.1</version>
<configuration>
<sdk>
<path>${sdk.path}</path>
<platform>19</platform>
</sdk>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
</configuration>
<extensions>true</extensions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
您可以尝试将其配置到您的主机文件中。
127.0.0.1 localhost
这可能是IDEA中的专家强制先读取localhost。然后你一直在阅读pom.xml。
是否因为单击"下一步"按钮不会产生任何结果而无法通过导入窗口?
如果这就是问题所在,那么这就是内存问题:
分配给Intellij导入程序的默认值不足以操作!
我在一个类似的问题中记录了这个问题的解决方案:内存问题作为"无法导入IntelliJ Idea中的maven项目"的答案
附言:不要问我为什么,因为我也很惊讶销售公司真的会犯这样的错误。