奇怪的AndroidStudio报错--checkDebugAarMetadata--修改SDK版本为33成功修复

使用Android Studio创建程序时报错
checkDebugAarMetadata:


6 issues were found when checking AAR metadata:

  1.  Dependency 'androidx.appcompat:appcompat-resources:1.6.1' 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).

  2.  Dependency 'androidx.appcompat:appcompat:1.6.1' 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).

  3.  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).

  4.  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).

  5.  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).

  6.  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).

在检查AAR元数据时发现6个问题:

1.  依赖项“androidx.appcompat:appcompat-resources:1.6.1”要求库和应用程序
的版本33或更高版本依赖它进行编译
Android api。

:app目前针对android-32进行编译。

建议操作:更新此项目以使用更新的compileSdkVersion
至少33个,例如33个。

请注意,更新库或应用程序的compileSdkVersion(其中
允许使用更新的api)可以与更新分开进行
targetSdkVersion(选择应用进入新的运行时行为)和
minSdkVersion(决定哪些设备可以安装应用程序)
上)。

2.  依赖项“androidx.appcompat:appcompat:1.6.1”要求库和应用程序
的版本33或更高版本依赖它进行编译
Android api。

:app目前针对android-32进行编译。

建议操作:更新此项目以使用更新的compileSdkVersion
至少33个,例如33个。

请注意,更新库或应用程序的compileSdkVersion(其中
允许使用更新的api)可以与更新分开进行
targetSdkVersion(选择应用进入新的运行时行为)和
minSdkVersion(决定哪些设备可以安装应用程序)
上)。

3.依赖项“androidx.activity:activity:1.6.0”要求库和应用程序
的版本33或更高版本依赖它进行编译
Android api。

:app目前针对android-32进行编译。

建议操作:更新此项目以使用更新的compileSdkVersion
至少33个,例如33个。

请注意,更新库或应用程序的compileSdkVersion(其中
允许使用更新的api)可以与更新分开进行
targetSdkVersion(选择应用进入新的运行时行为)和
minSdkVersion(决定哪些设备可以安装应用程序)
上)。

4.  依赖项“androidx.core:core-ktx:1.9.0”需要的库和应用程序
的版本33或更高版本依赖它进行编译
Android api。

:app目前针对android-32进行编译。

建议操作:更新此项目以使用更新的compileSdkVersion
至少33个,例如33个。

请注意,更新库或应用程序的compileSdkVersion(其中
允许使用更新的api)可以与更新分开进行
targetSdkVersion(选择应用进入新的运行时行为)和
minSdkVersion(决定哪些设备可以安装应用程序)
上)。

5.  依赖项“androidx.core:core:1.9.0”要求库和应用程序
的版本33或更高版本依赖它进行编译
Android api。

:app目前针对android-32进行编译。

建议操作:更新此项目以使用更新的compileSdkVersion
至少33个,例如33个。

请注意,更新库或应用程序的compileSdkVersion(其中
允许使用更新的api)可以与更新分开进行
targetSdkVersion(选择应用进入新的运行时行为)和
minSdkVersion(决定哪些设备可以安装应用程序)
上)。

6.  依赖项“androidx.annotation:annotation-experimental:1.3.0”要求库和应用程序
的版本33或更高版本依赖它进行编译
Android api。

:app目前针对android-32进行编译。

建议操作:更新此项目以使用更新的compileSdkVersion
至少33个,例如33个。

请注意,更新库或应用程序的compileSdkVersion(其中
允许使用更新的api)可以与更新分开进行
targetSdkVersion(选择应用进入新的运行时行为)和
minSdkVersion(决定哪些设备可以安装应用程序)
上)。

点击文件>项目结构>modules修改CompileSdk版本为33即可正常运行
在这里插入图片描述
看着错误提示好像是我的sdk编译版本有问题,但前几天用32还好好的,莫名其妙今天创建空项目程序都要用33实在不能理解,好在也就花了半小时,android studio的bug太玄学了

猜你喜欢

转载自blog.csdn.net/OrientalGlass/article/details/130855616