展开
拓展 关闭
订阅号推广码
GitHub
视频
公告栏 关闭

Android常见错误

错误1

A problem occurred configuring root project '����ʶ��'.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:8.4.0.
Required by:
project : > com.android.application:com.android.application.gradle.plugin:8.4.0
project : > com.android.library:com.android.library.gradle.plugin:8.4.0
> No matching variant of com.android.tools.build:gradle:8.4.0 was found. The consumer was configured to find a library for use during runtime, compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.6' but:
- Variant 'apiElements' capability com.android.tools.build:gradle:8.4.0 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 Java 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '8.6')
- Variant 'javadocElements' capability com.android.tools.build:gradle:8.4.0 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.6')
  • 解决方案:File -> Project Structure -> SDK Location -> JDK location was moved to Gradle Settings.

  • 将Gradle user home和项目的Gradle JDK改为一样的版本目录

报错2

The project is using an incompatible version (AGP 8.3.0-alpha01) of the Android Gradle plugin. Latest supported version is AGP 8.1.3.
  • 解决方案,将如下2个文件中的版本改小

报错3

Error running app:No target device found
  • 解决方案:先创建模拟环境,再点击运行
posted @   DogLeftover  阅读(215)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
历史上的今天:
2022-07-04 ddd:六边形架构、事件驱动架构、洋葱架构、整洁架构
2022-07-04 ddd:中台
2022-07-04 ddd:六层架构
2022-07-04 ddd:五层架构
2022-07-04 ddd:值对象、领域事件、反腐层
2022-07-04 日志(一)
2022-07-04 多版本并发控制:ReadView
点击右上角即可分享
微信分享提示

目录导航