英文:
How do I solve this error in Android Studio
问题
6个问题在检查AAR元数据时被发现:
-
依赖 'androidx.appcompat:appcompat-resources:1.6.0' 需要编译依赖于它的库和应用程序针对Android API的版本33或更高进行编译。
:app 目前是针对android-32进行编译的。
推荐操作:更新此项目以使用至少33的新编译SDK版本,例如33。
请注意,更新库或应用程序的编译SDK版本(允许使用新的API)可以与更新目标SDK版本(选择应用程序的新运行时行为)和最低SDK版本(确定应用程序可安装在哪些设备上)分开进行。 -
依赖 'androidx.appcompat:appcompat:1.6.0' 需要编译依赖于它的库和应用程序针对Android API的版本33或更高进行编译。
:app 目前是针对android-32进行编译的。
推荐操作:更新此项目以使用至少33的新编译SDK版本,例如33。
请注意,更新库或应用程序的编译SDK版本(允许使用新的API)可以与更新目标SDK版本(选择应用程序的新运行时行为)和最低SDK版本(确定应用程序可安装在哪些设备上)分开进行。 -
依赖 'androidx.activity:activity:1.6.0' 需要编译依赖于它的库和应用程序针对Android API的版本33或更高进行编译。
:app 目前是针对android-32进行编译的。
推荐操作:更新此项目以使用至少33的新编译SDK版本,例如33。
请注意,更新库或应用程序的编译SDK版本(允许使用新的API)可以与更新目标SDK版本(选择应用程序的新运行时行为)和最低SDK版本(确定应用程序可安装在哪些设备上)分开进行。 -
依赖 'androidx.core:core:1.9.0' 需要编译依赖于它的库和应用程序针对Android API的版本33或更高进行编译。
:app 目前是针对android-32进行编译的。
推荐操作:更新此项目以使用至少33的新编译SDK版本,例如33。
请注意,更新库或应用程序的编译SDK版本(允许使用新的API)可以与更新目标SDK版本(选择应用程序的新运行时行为)和最低SDK版本(确定应用程序可安装在哪些设备上)分开进行。 -
依赖 'androidx.core:core-ktx:1.9.0' 需要编译依赖于它的库和应用程序针对Android API的版本33或更高进行编译。
:app 目前是针对android-32进行编译的。
推荐操作:更新此项目以使用至少33的新编译SDK版本,例如33。
请注意,更新库或应用程序的编译SDK版本(允许使用新的API)可以与更新目标SDK版本(选择应用程序的新运行时行为)和最低SDK版本(确定应用程序可安装在哪些设备上)分开进行。 -
依赖 'androidx.annotation:annotation-experimental:1.3.0' 需要编译依赖于它的库和应用程序针对Android API的版本33或更高进行编译。
:app 目前是针对android-32进行编译的。
推荐操作:更新此项目以使用至少33的新编译SDK版本,例如33。
请注意,更新库或应用程序的编译SDK版本(允许使用新的API)可以与更新目标SDK版本(选择应用程序的新运行时行为)和最低SDK版本(确定应用程序可安装在哪些设备上)分开进行。
英文:
6 issues were found when checking AAR metadata:
-
Dependency 'androidx.appcompat:appcompat-resources:1.6.0' requires libraries and applications that
depend on it to compile against version 33 or later of the
Android APIs.:app is currently compiled against android-32.
Recommended action: Update this project to use a newer compileSdkVersion
of at least 33, for example 33.Note that updating a library or application's compileSdkVersion (which
allows newer APIs to be used) can be done separately from updating
targetSdkVersion (which opts the app in to new runtime behavior) and
minSdkVersion (which determines which devices the app can be installed
on). -
Dependency 'androidx.appcompat:appcompat:1.6.0' requires libraries and applications that
depend on it to compile against version 33 or later of the
Android APIs.:app is currently compiled against android-32.
Recommended action: Update this project to use a newer compileSdkVersion
of at least 33, for example 33.Note that updating a library or application's compileSdkVersion (which
allows newer APIs to be used) can be done separately from updating
targetSdkVersion (which opts the app in to new runtime behavior) and
minSdkVersion (which determines which devices the app can be installed
on). -
Dependency 'androidx.activity:activity:1.6.0' requires libraries and applications that
depend on it to compile against version 33 or later of the
Android APIs.:app is currently compiled against android-32.
Recommended action: Update this project to use a newer compileSdkVersion
of at least 33, for example 33.Note that updating a library or application's compileSdkVersion (which
allows newer APIs to be used) can be done separately from updating
targetSdkVersion (which opts the app in to new runtime behavior) and
minSdkVersion (which determines which devices the app can be installed
on). -
Dependency 'androidx.core:core:1.9.0' requires libraries and applications that
depend on it to compile against version 33 or later of the
Android APIs.:app is currently compiled against android-32.
Recommended action: Update this project to use a newer compileSdkVersion
of at least 33, for example 33.Note that updating a library or application's compileSdkVersion (which
allows newer APIs to be used) can be done separately from updating
targetSdkVersion (which opts the app in to new runtime behavior) and
minSdkVersion (which determines which devices the app can be installed
on). -
Dependency 'androidx.core:core-ktx:1.9.0' requires libraries and applications that
depend on it to compile against version 33 or later of the
Android APIs.:app is currently compiled against android-32.
Recommended action: Update this project to use a newer compileSdkVersion
of at least 33, for example 33.Note that updating a library or application's compileSdkVersion (which
allows newer APIs to be used) can be done separately from updating
targetSdkVersion (which opts the app in to new runtime behavior) and
minSdkVersion (which determines which devices the app can be installed
on). -
Dependency 'androidx.annotation:annotation-experimental:1.3.0' requires libraries and applications that
depend on it to compile against version 33 or later of the
Android APIs.:app is currently compiled against android-32.
Recommended action: Update this project to use a newer compileSdkVersion
of at least 33, for example 33.Note that updating a library or application's compileSdkVersion (which
allows newer APIs to be used) can be done separately from updating
targetSdkVersion (which opts the app in to new runtime behavior) and
minSdkVersion (which determines which devices the app can be installed
on).
I was trying to run a code
答案1
得分: 1
将您的编译SDK和目标SDK从32升级到33,或将您的 'androidx.appcompat:appcompat' 库版本从1.6.0更改为1.5.1。
英文:
Upgrade your compile Sdk and target Sdk 32 to 33 Or change your 'androidx.appcompat:appcompat' library version from 1.6.0 to 1.5.1.
答案2
得分: 0
在你的项目目录中前往:
Gradle 脚本 > build.gradle(模块:___)
android {
compileSdk 32 **(-> 将 32 修改为 33)**
...
}
英文:
In your project directory go to :
Gradle Scripts > build.gradle(Module : ___)
android {
compileSdk 32 **(-> Change 32 to 33)**
...
}
答案3
得分: 0
前往:文件 -> 项目结构 -> 模块:
属性 -> 编译 SDK 版本 -> 33:
默认配置 -> 目标 SDK 版本 -> 33。
英文:
Go to: File -> Project Structure -> Modules:
Properties -> Compile Sdk Version -> 33:
Default Config -> Target SDK Version - > 33.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论