在androidstudio 新建kotin 项目 提示报错 Dependency ‘androidx.appcompat:appcompat-resources:1.6.1‘,Android Studio Kotlin项目创建时依赖报错解析,androidx.appcompat:appcompat-resources:1.6.1出错标题,(注,这个标题只是一个基于您提供内容的初步猜测,具体的标题可能需要结合实际的错误内容和背景进行更精确的概括。)

马肤

温馨提示:这篇文章已超过440天没有更新,请注意相关的内容是否还可用!

摘要:在Android Studio中新建Kotlin项目时,提示报错关于依赖项'androidx.appcompat:appcompat-resources:1.6.1'的问题。这可能是依赖项版本不兼容或配置错误导致的。建议检查项目中的依赖项配置,确保使用正确的版本,并尝试同步项目以解决问题。如果问题仍然存在,可能需要进一步调查或寻求社区支持。
15 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.8.0' requires libraries and applications that
      depend on it to compile against version 34 or later of the
      Android APIs.
      :app is currently compiled against android-32.
      Also, the maximum recommended compile SDK version for Android Gradle
      plugin 7.2.2 is 33.
      Recommended action: Update this project's version of the Android Gradle
      plugin to one that supports 34, then update this project to use
      compileSdkVerion of at least 34.
      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.savedstate:savedstate:1.2.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).
  7.  Dependency 'androidx.lifecycle:lifecycle-process:2.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).
  8.  Dependency 'androidx.lifecycle:lifecycle-livedata-core:2.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).
  9.  Dependency 'androidx.lifecycle:lifecycle-livedata:2.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).
 10.  Dependency 'androidx.lifecycle:lifecycle-viewmodel:2.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).
 11.  Dependency 'androidx.lifecycle:lifecycle-runtime:2.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).
 12.  Dependency 'androidx.lifecycle:lifecycle-viewmodel-savedstate:2.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).
 13.  Dependency 'androidx.profileinstaller:profileinstaller: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).
 14.  Dependency 'androidx.arch.core:core-runtime:2.2.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).
 15.  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).

解决方法 :

在androidstudio 新建kotin 项目 提示报错 Dependency ‘androidx.appcompat:appcompat-resources:1.6.1‘,Android Studio Kotlin项目创建时依赖报错解析,androidx.appcompat:appcompat-resources:1.6.1出错标题,(注,这个标题只是一个基于您提供内容的初步猜测,具体的标题可能需要结合实际的错误内容和背景进行更精确的概括。) 第1张
(图片来源网络,侵删)

网上看的大都是修改 sdk版本 但是修改了版本后还会有其他的问题出现

我这里的解决方案是 将依赖的插件版本进行修改

在androidstudio 新建kotin 项目 提示报错 Dependency ‘androidx.appcompat:appcompat-resources:1.6.1‘,Android Studio Kotlin项目创建时依赖报错解析,androidx.appcompat:appcompat-resources:1.6.1出错标题,(注,这个标题只是一个基于您提供内容的初步猜测,具体的标题可能需要结合实际的错误内容和背景进行更精确的概括。) 第2张
(图片来源网络,侵删)

如下:

原来是

 implementation 'androidx.core:core-ktx:1.7.0'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.10.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'
dependencies {
   	implementation 'androidx.core:core-ktx:1.7.0'
    implementation 'androidx.appcompat:appcompat:1.5.1'
    implementation 'com.google.android.material:material:1.6.1'
    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'

不需要修改sdk 也能运行成功


0
收藏0
文章版权声明:除非注明,否则均为VPS857原创文章,转载或复制请以超链接形式并注明出处。

相关阅读

  • 【研发日记】Matlab/Simulink自动生成代码(二)——五种选择结构实现方法,Matlab/Simulink自动生成代码的五种选择结构实现方法(二),Matlab/Simulink自动生成代码的五种选择结构实现方法详解(二)
  • 超级好用的C++实用库之跨平台实用方法,跨平台实用方法的C++实用库超好用指南,C++跨平台实用库使用指南,超好用实用方法集合,C++跨平台实用库超好用指南,方法与技巧集合
  • 【动态规划】斐波那契数列模型(C++),斐波那契数列模型(C++实现与动态规划解析),斐波那契数列模型解析与C++实现(动态规划)
  • 【C++】,string类底层的模拟实现,C++中string类的模拟底层实现探究
  • uniapp 小程序实现微信授权登录(前端和后端),Uniapp小程序实现微信授权登录全流程(前端后端全攻略),Uniapp小程序微信授权登录全流程攻略,前端后端全指南
  • Vue脚手架的安装(保姆级教程),Vue脚手架保姆级安装教程,Vue脚手架保姆级安装指南,Vue脚手架保姆级安装指南,从零开始教你如何安装Vue脚手架
  • 如何在树莓派 Raspberry Pi中本地部署一个web站点并实现无公网IP远程访问,树莓派上本地部署Web站点及无公网IP远程访问指南,树莓派部署Web站点及无公网IP远程访问指南,本地部署与远程访问实践,树莓派部署Web站点及无公网IP远程访问实践指南,树莓派部署Web站点及无公网IP远程访问实践指南,本地部署与远程访问详解,树莓派部署Web站点及无公网IP远程访问实践详解,本地部署与远程访问指南,树莓派部署Web站点及无公网IP远程访问实践详解,本地部署与远程访问指南。
  • vue2技术栈实现AI问答机器人功能(流式与非流式两种接口方法),Vue2技术栈实现AI问答机器人功能,流式与非流式接口方法探究,Vue2技术栈实现AI问答机器人功能,流式与非流式接口方法详解
  • 发表评论

    快捷回复:表情:
    评论列表 (暂无评论,0人围观)

    还没有评论,来说两句吧...

    目录[+]

    取消
    微信二维码
    微信二维码
    支付宝二维码