Android gradle.plugin:8.1.1打包报错

PS E:\CODE\AAA> .\gradlew assembleRelease

Starting a Gradle Daemon, 1 incompatible and 5 stopped Daemons could not be reused, use --status for details

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project 'AAA'.

Could not resolve all files for configuration ':classpath'.

Could not resolve com.android.tools.build:gradle:8.1.1.

Required by:

project : > com.android.application:com.android.application.gradle.plugin:8.1.1

project : > com.android.library:com.android.library.gradle.plugin:8.1.1

No matching variant of com.android.tools.build:gradle:8.1.1 was found. The consumer was configured to find a library for use during runtime, compatible with Java 8, packaged as a jar, and its depen

dencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.1.1' but:

  • Variant 'apiElements' capability com.android.tools.build:gradle:8.1.1 declares a library, packaged as a jar, and its dependencies declared externally:

  • Incompatible because this component declares a component for use during compile-time, compatible with Java 11 and the consumer needed a component for use during runtime, compatible with Jav

a 8

  • Other compatible attribute:

  • Doesn't say anything about org.gradle.plugin.api-version (required '8.1.1')

  • Variant 'javadocElements' capability com.android.tools.build:gradle:8.1.1 declares a component for use during runtime, and its dependencies declared externally:

  • Incompatible because this component declares documentation and the consumer needed a library

  • Other compatible attributes:

  • Doesn't say anything about its target Java version (required compatibility with Java 8)

  • Doesn't say anything about its elements (required them packaged as a jar)

  • Doesn't say anything about org.gradle.plugin.api-version (required '8.1.1')

  • Variant 'runtimeElements' capability com.android.tools.build:gradle:8.1.1 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally:

  • Incompatible because this component declares a component, compatible with Java 11 and the consumer needed a component, compatible with Java 8

  • Other compatible attribute:

  • Doesn't say anything about org.gradle.plugin.api-version (required '8.1.1')

  • Variant 'sourcesElements' capability com.android.tools.build:gradle:8.1.1 declares a component for use during runtime, and its dependencies declared externally:

  • Incompatible because this component declares documentation and the consumer needed a library

  • Other compatible attributes:

  • Doesn't say anything about its target Java version (required compatibility with Java 8)

  • Doesn't say anything about its elements (required them packaged as a jar)

  • Doesn't say anything about org.gradle.plugin.api-version (required '8.1.1')

  • 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.

BUILD FAILED in 6s

相关推荐
会博通·代码搬运工17 小时前
会博通API对接实战:工程企业文档分布式采集系统的技术实现与Python SDK详解
开发语言·分布式·python·线性代数·矩阵·架构·电子档案合规
杉氧18 小时前
跨平台持久化:Flutter 本地数据库的多线程安全与架构设计实践
android·前端·flutter
林森lsjs18 小时前
完结撒花!Java SE 语法阶段总结!
java·开发语言
lupai18 小时前
短信接口快速接入与调用实战指南
java·开发语言·数据库
刘名喜18 小时前
第12篇-Gradle-Kotlin-DSL构建指南
开发语言·kotlin·springboot
小孔龙18 小时前
Compose 布局与绘制:LayoutNode、DisplayList 与 GraphicsLayer
android·android jetpack
大鱼>18 小时前
DSPy:LLM程序自动编译与提示词优化
开发语言·人工智能·python·深度学习
淡淡的香烟18 小时前
Android常用adb命令
android·adb
撩妹帝九歌18 小时前
Java文件写入与编码、字节数组、字符集、字符编解码 一文打通!
java·开发语言
星核0penstarry18 小时前
Solon AI v4.0.4 技术分析:Java Agent 框架的兼容性突破与选型考量 基于 OSCHINA 2026-07-30 报道及公开技术资料整理
java·开发语言·人工智能