Android Studio踩坑记录

一、5 issues were found when checking AAR metadata:    1.  Dependency 'androidx.appcompat:appcompat-resources:1.7.0' requires libraries and applications that       depend on it to compile against version 34 or later of the       Android APIs.

诸如此类的问题

版本问题,我改了两个地方:


1、在build.gradle下方的dependencies

dependencies {

implementation 'androidx.appcompat:appcompat:1.6.0'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}

这里面的模块太新,所以需要降一降版本,把androidx.appcompat:appcompat降到1.6.0它就能编译通了

2、在File->Project Structrue中把Android Gradle Plugin Version 改成8.0.0:

这样配置文件生成的时候依赖也不会有问题

 

这样调完这两个选项之后编译就能通过了。


posted @   Thaudmin  阅读(288)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了

阅读目录(Content)

此页目录为空

点击右上角即可分享
微信分享提示