首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Gradle不要在Eclipse中导入VertX库

Gradle不要在Eclipse中导入VertX库
EN

Stack Overflow用户
提问于 2022-08-08 17:06:52
回答 1查看 71关注 0票数 3

我在eclipse上导入了一个java项目,其中有build.gradle,如下所示:

代码语言:javascript
复制
plugins {
    // Apply the java-library plugin to add support for Java Library
    id 'application'
    id 'java-library'
    id 'eclipse'
}

repositories {
    mavenCentral()
}

dependencies {

    implementation 'io.vertx:vertx-core:4.2.6'    
    implementation 'io.vertx:vertx-web:4.2.6'
    implementation 'io.vertx:vertx-web-client:4.2.6'
    implementation 'io.vertx:vertx-mqtt:4.2.6'

    // Use JUnit test framework
    testImplementation 'junit:junit:4.13.2'

    /* for logging */
    implementation 'org.slf4j:slf4j-api:1.7.25'
    implementation 'org.slf4j:slf4j-jdk14:1.7.36'
}

但是eclipse在代码中显示了一个错误“导入io无法解决”:

代码语言:javascript
复制
import io.vertx.core.Vertx;

/*
 * Data Service as a vertx event-loop 
 */
public class RunService {


    public static void main(String[] args) {
        Vertx vertx = Vertx.vertx();
        DataService service = new DataService(8080);
        vertx.deployVerticle(service);
    }
}

我能做什么?

项目结构:

EN

回答 1

Stack Overflow用户

发布于 2022-08-09 02:36:23

JCenter去年是表示反对并使其只读。今年的新版本,如您试图使用的版本,将永远不会出现在JCenter上。您需要用mavenCentral()替换它。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73281648

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档