当我运行gradle时,我在 module-info.java 中声明的所有必需模块都找不到:
module-info.java
/Users/Joseph/eclipse-workspace/CheckMyDigitalFootprint/src/main/java/module-info.java:10: error: module not found: com.jfoenix requires com.jfoenix; /Users/Joseph/eclipse-workspace/CheckMyDigitalFootprint/src/main/java/module-info.java:11: error: module not found: google.api.client requires google.api.client; /Users/Joseph/eclipse-workspace/CheckMyDigitalFootprint/src/main/java/module-info.java:12: error: module not found: google.api.services.gmail.v1.rev83 requires google.api.services.gmail.v1.rev83; /Users/Joseph/eclipse-workspace/CheckMyDigitalFootprint/src/main/java/module-info.java:13: error: module not found: google.http.client requires google.http.client; /Users/Joseph/eclipse-workspace/CheckMyDigitalFootprint/src/main/java/module-info.java:14: error: module not found: google.http.client.jackson2 requires google.http.client.jackson2; /Users/Joseph/eclipse-workspace/CheckMyDigitalFootprint/src/main/java/module-info.java:15: error: module not found: google.oauth.client requires google.oauth.client; /Users/Joseph/eclipse-workspace/CheckMyDigitalFootprint/src/main/java/module-info.java:16: error: module not found: google.oauth.client.java6 requires google.oauth.client.java6; /Users/Joseph/eclipse-workspace/CheckMyDigitalFootprint/src/main/java/module-info.java:17: error: module not found: google.oauth.client.jetty requires google.oauth.client.jetty; /Users/Joseph/eclipse-workspace/CheckMyDigitalFootprint/src/main/java/module-info.java:18: error: module not found: java.xml.bind requires java.xml.bind; /Users/Joseph/eclipse-workspace/CheckMyDigitalFootprint/src/main/java/module-info.java:23: error: module not found: org.json requires org.json;
module-info.java:
module footprint { requires com.jfoenix; requires google.api.client; requires google.api.services.gmail.v1.rev83; requires google.http.client; requires google.http.client.jackson2; requires google.oauth.client; requires google.oauth.client.java6; requires google.oauth.client.jetty; requires java.xml.bind; requires transitive javafx.base; requires javafx.controls; requires javafx.fxml; requires transitive javafx.graphics; requires org.json; requires java.prefs; opens checkmydigitalfootprint to javafx.fxml; exports checkmydigitalfootprint.util; exports checkmydigitalfootprint; exports checkmydigitalfootprint.model; exports checkmydigitalfootprint.view; }
文件夹结构:
发布于 2018-12-10 13:46:25
您可能需要确保 modify the compileJava task 为:
compileJava
compileJava { inputs.property("moduleName", moduleName) doFirst { options.compilerArgs = [ '--module-path', classpath.asPath,