Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save danielcshn/3f90dc4ee16db008b02bf0a4e0ff1988 to your computer and use it in GitHub Desktop.
Save danielcshn/3f90dc4ee16db008b02bf0a4e0ff1988 to your computer and use it in GitHub Desktop.
Fix issues were found when checking AAR metadata in Android Studio | 2022.3.1

๐Ÿ“œ Info:

  • Android Studio Giraffe | 2022.3.1 Patch 4
  • Build #AI-223.8836.35.2231.11090377, built on November 13, 2023
  • Runtime version: 17.0.6+0-b2043.56-10027231 amd64
  • VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
  • Gradle JDK: jbr-17 (JetBrains Runtime version 17.0.6)
  • Windows 11 22H2 (version 10.0.22621.2715)

๐Ÿ› Bug/Error log:

4 issues were found when checking AAR metadata:

  1.  Dependency 'androidx.navigation:navigation-common:2.7.5' 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-33.

      Recommended action: Update this project to use a newer compileSdk
      of at least 34, for example 34.

      Note that updating a library or application's compileSdk (which
      allows newer APIs to be used) can be done separately from updating
      targetSdk (which opts the app in to new runtime behavior) and
      minSdk (which determines which devices the app can be installed
      on).

  2.  Dependency 'androidx.navigation:navigation-fragment:2.7.5' 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-33.

      Recommended action: Update this project to use a newer compileSdk
      of at least 34, for example 34.

      Note that updating a library or application's compileSdk (which
      allows newer APIs to be used) can be done separately from updating
      targetSdk (which opts the app in to new runtime behavior) and
      minSdk (which determines which devices the app can be installed
      on).

  3.  Dependency 'androidx.navigation:navigation-runtime:2.7.5' 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-33.

      Recommended action: Update this project to use a newer compileSdk
      of at least 34, for example 34.

      Note that updating a library or application's compileSdk (which
      allows newer APIs to be used) can be done separately from updating
      targetSdk (which opts the app in to new runtime behavior) and
      minSdk (which determines which devices the app can be installed
      on).

  4.  Dependency 'androidx.navigation:navigation-ui:2.7.5' 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-33.

      Recommended action: Update this project to use a newer compileSdk
      of at least 34, for example 34.

      Note that updating a library or application's compileSdk (which
      allows newer APIs to be used) can be done separately from updating
      targetSdk (which opts the app in to new runtime behavior) and
      minSdk (which determines which devices the app can be installed
      on).

๐Ÿ”ง Fix:

1.- File > Settings > Languages & Frameworks > Android SDK... Download all packages related to Android 14 or API Level 34.

2.- build.gradle:

android {
    compileSdk 34
    
    (...)
        
    defaultConfig {
        (...)
        
        targetSdk 34
        
        (...)
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment