菜鸟学习Gradle(1)

时间:2024-03-30 20:04:37

IDEA导入Gradle项目时报错(问题描述1)

报错信息如下:
英文:
17:08:41: Executing task ‘build’…
FAILURE: Build failed with an exception.

  • What went wrong:
    Could not resolve all files for configuration ‘:compileClasspath’.

Could not resolve com.ceair.pss:dc-sdk-product:1.0.0.
Required by:
project :
Could not resolve com.ceair.pss:dc-sdk-product:1.0.0.
inconsistent module metadata found. Descriptor: com.ceair.pss:dc-sdk-dev:1.0.0 Errors: bad module name: expected=‘dc-sdk-product’ found=‘dc-sdk-dev’
Could not resolve com.ceair.pss:dc-sdk-product:1.0.0.
Could not get resource ‘https://repo.maven.apache.org/maven2/com/ceair/pss/dc-sdk-product/1.0.0/dc-sdk-product-1.0.0.pom’.
Could not HEAD ‘https://repo.maven.apache.org/maven2/com/ceair/pss/dc-sdk-product/1.0.0/dc-sdk-product-1.0.0.pom’.
Received fatal alert: protocol_version

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1s
1 actionable task: 1 executed
Cause: inconsistent module metadata found. Descriptor: com.ceair.pss:dc-sdk-dev:1.0.0 Errors: bad module name: expected=‘dc-sdk-product’ found=‘dc-sdk-dev’
17:08:43: Task execution finished ‘build’.
中文:
17:08:41:执行任务“构建”…不赞成使用Java 7运行Gradle,并计划在5.0中删除它。请查看https://docs.gradle.org/4.4/userguide/java_plugin.html#sec: java_cross_compile以获取更多细节。:compileJava失败失败:除异常外,构建失败。出了什么问题:无法解析所有配置文件’:compiler eclasspath '。

无法解决com.ceair.pss:dc-sdk-product:1.0.0。要求:项目:
无法解决com.ceair.pss:dc-sdk-product:1.0.0。找到不一致的模块元数据。描述符:com.ceair.pss:dc-sdk-dev:1.0.0错误:坏模块名:expect =‘dc-sdk-product’ found=‘dc-sdk-dev’
无法解决com.ceair.pss:dc-sdk-product:1.0.0。
无法获得资源“https://repo.maven.apache.org/maven2/com/ceair/pss/dc-sdk-product/1.0.0/dc-sdk-product-1.0.0.pom”。
无法引导“https://repo.maven.apache.org/maven2/com/ceair/pss/dc-sdk-product/1.0.0/dc-sdk-product-1.0.0.pom”。
收到致命警告:protocol_version*试一试:使用-stacktrace选项获得堆栈跟踪。使用-info或-debug选项运行以获得更多日志输出。与-扫描得到充分的见解。获得更多帮助请访问https://help.gradle.org1次构建失败1 .可执行任务:1 .执行原因:发现模块元数据不一致。描述符:com.ceair.pss:dc-sdk-dev:1.0.0错误:坏模块名:expect =‘dc-sdk-product’ found='dc-sdk-dev’17:08:43:任务执行完成“构建”。

总结:
浅谈Gradle

  1. 环境准备
    1.1 安装与配置
    下载地址:gradle的网站是https://gradle.org/releases/
    1.2 点击下载
    菜鸟学习Gradle(1)
    1.3解压后配置环境变量
    菜鸟学习Gradle(1)
    1.4 测试安装是否正确
    菜鸟学习Gradle(1)
    2.使用IDEA导入gradle项目
    2.1 IntelliJ IDEA导入Gradle项目,配置tomcat
    2.2Intellij IDEA创建Gradle项目并配置Tomcat跑起来
    3.问题解决见下篇