簡體   English   中英

無法使用maven插件導入intellij中的okhttp項目

[英]Not able to import okhttp project in intellij using maven plugin

我無法在intellij中成功導入okhttp項目。

https://github.com/square/okhttp

我正在使用intellij社區版:2016.1 Maven:3.0

當我點擊make。 它顯示“okhttp-tests”模塊的以下錯誤消息:

Error:(94, 49) java: diamond operator is not supported in -source 1.5
(use -source 7 or higher to enable diamond operator)

所有子模塊的語言級別自動設置為5,而對於父級,它設置為7.當我將okhttp-tests模塊的語言級別更改為7和hot make時,想法顯示以下錯誤消息:

Error:java: javacTask: source release 1.7 requires target release 1.7

我使用錯誤版本的idea / maven嗎? 請幫忙。

此外,沒有詳細的文檔可用於在git repo上導入項目/設置開發環境。 我想請求okhttp成員為像我這樣的初學者創建一個描述性的Contributors.md文件。

如果JAVA_HOME設置正確,請同時檢查Project Parent POM文件中的編譯器版本maven-compiler-plugin

<build>
<plugins>
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
            <source>1.7</source>
            <target>1.7</target>
        </configuration>
    </plugin>
</plugins>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM