【问题标题】:Xml Suggestions not getting after change compileSdk & targetSdk to 33Xml Suggestions not getting after change compile Sdk vs target Sdk to 33
【发布时间】:2022-10-21 23:27:38
【问题描述】:

我在将 compilesdk 和 targetsdk 更新到 33 时遇到了一些问题。

如果我将 compilesdk 或 targetsdk 设置为 32、31 或更低,我会在编译期间遇到另一个库支持问题,如下所述......

 1.  Dependency 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.0-alpha02' 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.

  Also, the maximum recommended compile SDK version for Android Gradle
  plugin 7.2.1 is 32.

  Recommended action: Update this project's version of the Android Gradle
  plugin to one that supports 33, then update this project to use
  compileSdkVerion of at least 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).

并在所有新添加的库中遇到同样的问题

我不确定这是 sdk 33 还是库问题。

我已经尝试过这个---> https://stackoverflow.com/questions/30684613/android-studio-xml-editor-autocomplete-not-working-with-support-libraries/54007742#54007742

【问题讨论】:

    标签: android xml gradle


    【解决方案1】:

    请参考此link。 Android Studio Chipmunk 版本存在问题。 Google 团队已在 Android Studio Dolphin 中修复。检查Issue Tracker 以及

    【讨论】:

      【解决方案2】:

      将 build.gradle(app) 文件中的 def 生命周期版本 =“2.6.0-alpha02”替换为 def 生命周期版本 =“2.4.0-rc01”

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2021-04-02
        • 1970-01-01
        • 2014-10-26
        • 1970-01-01
        • 2022-12-27
        • 2011-05-02
        • 1970-01-01
        • 2022-12-16
        相关资源
        最近更新 更多