2016-08-08 2 views
0

게임 Minecraft에 대한 모드를 만들고 있습니다. 이클립스를 사용하면 모든 작업이 정상적으로 완료되고 컴파일이 성공하며 작성한 MOD를 사용하여 게임을 즐길 수 있습니다. 이 이클립스에 작동하지만 Gradle을하지 않는 이유를 이해하지 못하는실제 인수는 ... 메소드 호출 변환으로 변환 할 수 없습니다.

C:\Users\Alexandre\MCForge\ForgeCreeperHeal\debug\build\sources\main\java\fr\eyzox\dependencygraph\DependencyGraph.java:31: error: method buildIndex in class DataKeyProvider<K> cannot be applied to given types; 
         node.keyProvider.buildIndex(index, node); 
             ^
    required: Map<KEY,DependencyGraph<KEY,? extends IData<KEY>>.Node>,DependencyGraph<KEY,? extends IData<KEY>>.Node 
    found: Map<KEY,DependencyGraph<KEY,DATA>.Node>,DependencyGraph<KEY,DATA>.Node 
    reason: actual argument Map<KEY,DependencyGraph<KEY,DATA>.Node> cannot be converted to Map<KEY,DependencyGraph<KEY,? extends IData<KEY>>.Node> by method invocation conversion 
    where KEY,DATA,K are type-variables: 
    KEY extends Object declared in class DependencyGraph 
    DATA extends IData<KEY> declared in class DependencyGraph 
    K extends Object declared in class DataKeyProvider 

: 나는 Gradle을 사용하여 내 코드를 컴파일 할 때 그러나,이 오류가 발생합니다. 어쩌면 그것은 자바의 generics missunderstanding이지만, Eclipse에서 모든 것이 잘 작동하기 때문에 의심 스럽다. 내 편이 잘못되었거나 gradle 플러그인 버그를 찾아야합니까? 나는 gradle에서 초보자입니다.

내 문제를 이해하려면 소스 코드와 build.gradle이 필요할 수 있습니다. 여기에 레포를 만들었습니다 : https://github.com/RedRelay/FCH_DEBUG

편집 : 이클립스와 관련된 문제인 것 같습니다. 나는 이클립스가 자체 컴파일러를 가지고 있다는 것을 배웠고, 표준 javac 대신 이것을 허용하는 것으로 보인다.

답변

0

Eclipse에는 표준 javac 컴파일러 대신 자체 컴파일러가 있습니다. 나는 protected abstract <D extends IData<K>> void buildIndex(final Map<K, DependencyGraph<K, D>.Node> index, final DependencyGraph<K, D>.Node theNode) throws DuplicateKeyException;

protected abstract void buildIndex(final Map<K, DependencyGraph<K, ? extends IData<K>>.Node> index, final DependencyGraph<K, ? extends IData<K>>.Node theNode) throws DuplicateKeyException; 을 변경 한 그것은 작동합니다.

관련 문제