kandi background
Explore Kits

androidx | Development environment for Android Jetpack

 by   androidx Kotlin Version: Current License: Apache-2.0

 by   androidx Kotlin Version: Current License: Apache-2.0

Download this library from

kandi X-RAY | androidx Summary

androidx is a Kotlin library typically used in Institutions, Learning, Administration, Public Services applications.,roidx has no bugs, it has no vulnerabilities, it has a Permissive License and it has high support. You can download it from GitHub.
Jetpack is a suite of libraries, tools, and guidance to help developers write high-quality apps easier. These components help you follow best practices, free you from writing boilerplate code, and simplify complex tasks, so you can focus on the code you care about. Jetpack comprises the androidx.* package libraries, unbundled from the platform APIs. This means that it offers backward compatibility and is updated more frequently than the Android platform, making sure you always have access to the latest and greatest versions of the Jetpack components. Our official AARs and JARs binaries are distributed through Google Maven. You can learn more about using it from Android Jetpack landing page.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • androidx has a highly active ecosystem.
  • It has 3621 star(s) with 540 fork(s). There are 101 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 0 open issues and 3 have been closed. On average issues are closed in 2 days. There are 11 open pull requests and 0 closed requests.
  • It has a positive sentiment in the developer community.
  • The latest version of androidx is current.
androidx Support
Best in #Kotlin
Average in #Kotlin
androidx Support
Best in #Kotlin
Average in #Kotlin

quality kandi Quality

  • androidx has no bugs reported.
androidx Quality
Best in #Kotlin
Average in #Kotlin
androidx Quality
Best in #Kotlin
Average in #Kotlin

securitySecurity

  • androidx has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
androidx Security
Best in #Kotlin
Average in #Kotlin
androidx Security
Best in #Kotlin
Average in #Kotlin

license License

  • androidx is licensed under the Apache-2.0 License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
androidx License
Best in #Kotlin
Average in #Kotlin
androidx License
Best in #Kotlin
Average in #Kotlin

buildReuse

  • androidx releases are not available. You will need to build from source code and install.
  • Installation instructions, examples and code snippets are available.
androidx Reuse
Best in #Kotlin
Average in #Kotlin
androidx Reuse
Best in #Kotlin
Average in #Kotlin
Top functions reviewed by kandi - BETA

kandi has reviewed androidx and discovered the below as its top functions. This is intended to give you an instant insight into androidx implemented functionality, and help decide if they suit your requirements.

  • Preload the resource manager
    • Start transitions .
      • Simple measure .
        • Initialize the controller .
          • Parse C1 C1 C1 command .
            • Returns a list of instructions that can be launched to navigate to a nav bar .
              • Calculate the exact format of the view .
                • Create a random item
                  • On layout children .
                    • Renders frame info .

                      Get all kandi verified functions for this library.

                      Get all kandi verified functions for this library.

                      androidx Key Features

                      Development environment for Android Jetpack extension libraries under the androidx namespace. Synchronized with Android Jetpack's primary development branch on AOSP.

                      Checking Out the Code

                      copy iconCopydownload iconDownload
                      mkdir ~/bin
                      PATH=~/bin:$PATH
                      curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
                      chmod a+x ~/bin/repo
                      

                      Using Android Studio

                      copy iconCopydownload iconDownload
                      cd path/to/checkout/frameworks/support/
                      ANDROIDX_PROJECTS=MAIN ./gradlew studio
                      

                      Full Build (Optional)

                      copy iconCopydownload iconDownload
                      cd path/to/checkout/frameworks/support/
                      ./gradlew createArchive
                      

                      Testing modified AndroidX Libraries to in your App

                      copy iconCopydownload iconDownload
                      ./gradlew createArchive
                      

                      Making a change

                      copy iconCopydownload iconDownload
                      cd path/to/checkout/frameworks/support/
                      repo start my_branch_name .
                      # make needed modifications...
                      git commit -a
                      repo upload --current-branch .
                      

                      Unknown host CPU architecture: arm64 , Android NDK SiliconM1 Apple MacBook Pro

                      copy iconCopydownload iconDownload
                      android {
                          ndkVersion "24.0.8215888"
                          ...
                      }
                      
                      echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;24.0.8215888'
                      
                      echo "y" | sudo ${ANDROID_HOME}/sdk/cmdline-tools/latest/bin/sdkmanager --install 'ndk;24.0.8215888'
                      
                      find ~ -name ndk-build 2>/dev/null
                      
                      vi ~/Library/Android/sdk/ndk/22.1.7171670/ndk-build
                      
                      DIR="$(cd "$(dirname "$0")" && pwd)"
                      $DIR/build/ndk-build "$@"
                      
                      DIR="$(cd "$(dirname "$0")" && pwd)"
                      arch -x86_64 /bin/bash $DIR/build/ndk-build "$@"
                      
                      android {
                          ndkVersion "24.0.8215888"
                          ...
                      }
                      
                      echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;24.0.8215888'
                      
                      echo "y" | sudo ${ANDROID_HOME}/sdk/cmdline-tools/latest/bin/sdkmanager --install 'ndk;24.0.8215888'
                      
                      find ~ -name ndk-build 2>/dev/null
                      
                      vi ~/Library/Android/sdk/ndk/22.1.7171670/ndk-build
                      
                      DIR="$(cd "$(dirname "$0")" && pwd)"
                      $DIR/build/ndk-build "$@"
                      
                      DIR="$(cd "$(dirname "$0")" && pwd)"
                      arch -x86_64 /bin/bash $DIR/build/ndk-build "$@"
                      
                      android {
                          ndkVersion "24.0.8215888"
                          ...
                      }
                      
                      echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;24.0.8215888'
                      
                      echo "y" | sudo ${ANDROID_HOME}/sdk/cmdline-tools/latest/bin/sdkmanager --install 'ndk;24.0.8215888'
                      
                      find ~ -name ndk-build 2>/dev/null
                      
                      vi ~/Library/Android/sdk/ndk/22.1.7171670/ndk-build
                      
                      DIR="$(cd "$(dirname "$0")" && pwd)"
                      $DIR/build/ndk-build "$@"
                      
                      DIR="$(cd "$(dirname "$0")" && pwd)"
                      arch -x86_64 /bin/bash $DIR/build/ndk-build "$@"
                      
                      android {
                          ndkVersion "24.0.8215888"
                          ...
                      }
                      
                      echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;24.0.8215888'
                      
                      echo "y" | sudo ${ANDROID_HOME}/sdk/cmdline-tools/latest/bin/sdkmanager --install 'ndk;24.0.8215888'
                      
                      find ~ -name ndk-build 2>/dev/null
                      
                      vi ~/Library/Android/sdk/ndk/22.1.7171670/ndk-build
                      
                      DIR="$(cd "$(dirname "$0")" && pwd)"
                      $DIR/build/ndk-build "$@"
                      
                      DIR="$(cd "$(dirname "$0")" && pwd)"
                      arch -x86_64 /bin/bash $DIR/build/ndk-build "$@"
                      
                      android {
                          ndkVersion "24.0.8215888"
                          ...
                      }
                      
                      echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;24.0.8215888'
                      
                      echo "y" | sudo ${ANDROID_HOME}/sdk/cmdline-tools/latest/bin/sdkmanager --install 'ndk;24.0.8215888'
                      
                      find ~ -name ndk-build 2>/dev/null
                      
                      vi ~/Library/Android/sdk/ndk/22.1.7171670/ndk-build
                      
                      DIR="$(cd "$(dirname "$0")" && pwd)"
                      $DIR/build/ndk-build "$@"
                      
                      DIR="$(cd "$(dirname "$0")" && pwd)"
                      arch -x86_64 /bin/bash $DIR/build/ndk-build "$@"
                      
                      android {
                          ndkVersion "24.0.8215888"
                          ...
                      }
                      
                      echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;24.0.8215888'
                      
                      echo "y" | sudo ${ANDROID_HOME}/sdk/cmdline-tools/latest/bin/sdkmanager --install 'ndk;24.0.8215888'
                      
                      find ~ -name ndk-build 2>/dev/null
                      
                      vi ~/Library/Android/sdk/ndk/22.1.7171670/ndk-build
                      
                      DIR="$(cd "$(dirname "$0")" && pwd)"
                      $DIR/build/ndk-build "$@"
                      
                      DIR="$(cd "$(dirname "$0")" && pwd)"
                      arch -x86_64 /bin/bash $DIR/build/ndk-build "$@"
                      
                      android {
                          ndkVersion "24.0.8215888"
                          ...
                      }
                      
                      echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;24.0.8215888'
                      
                      echo "y" | sudo ${ANDROID_HOME}/sdk/cmdline-tools/latest/bin/sdkmanager --install 'ndk;24.0.8215888'
                      
                      find ~ -name ndk-build 2>/dev/null
                      
                      vi ~/Library/Android/sdk/ndk/22.1.7171670/ndk-build
                      
                      DIR="$(cd "$(dirname "$0")" && pwd)"
                      $DIR/build/ndk-build "$@"
                      
                      DIR="$(cd "$(dirname "$0")" && pwd)"
                      arch -x86_64 /bin/bash $DIR/build/ndk-build "$@"
                      
                      #!/bin/sh
                      DIR="$(cd "$(dirname "$0")" && pwd)"
                      $DIR/build/ndk-build "$@"
                      
                      #!/bin/sh
                      DIR="$(cd "$(dirname "$0")" && pwd)"
                      arch -x86_64 /bin/bash $DIR/build/ndk-build "$@"
                      
                      #!/bin/sh
                      DIR="$(cd "$(dirname "$0")" && pwd)"
                      $DIR/build/ndk-build "$@"
                      
                      #!/bin/sh
                      DIR="$(cd "$(dirname "$0")" && pwd)"
                      arch -x86_64 /bin/bash $DIR/build/ndk-build "$@"
                      
                      Android Studio 2021.1.1
                      Android Gradle Plugin 7.1.0 (the plugin includes an aapt2 binary)
                      Android SDK Build-Tools 32.1-rc1 (SDK's stable channel)
                      Android SDK Platform Tools 32.0.0 (SDK's stable channel)
                      Android NDK 24.0.7956693 (beta 2, from the SDK's beta channel)
                      CMake 3.22.1 (SDK's canary channel)
                      
                      android {
                          ndkVersion "24.0.7956693-beta2"
                          externalNativeBuild {
                              cmake {
                                  path file('src/main/cpp/CMakeLists.txt')
                                  version '3.22.1'
                              }
                          }
                      }
                      
                      Android Studio 2021.1.1
                      Android Gradle Plugin 7.1.0 (the plugin includes an aapt2 binary)
                      Android SDK Build-Tools 32.1-rc1 (SDK's stable channel)
                      Android SDK Platform Tools 32.0.0 (SDK's stable channel)
                      Android NDK 24.0.7956693 (beta 2, from the SDK's beta channel)
                      CMake 3.22.1 (SDK's canary channel)
                      
                      android {
                          ndkVersion "24.0.7956693-beta2"
                          externalNativeBuild {
                              cmake {
                                  path file('src/main/cpp/CMakeLists.txt')
                                  version '3.22.1'
                              }
                          }
                      }
                      

                      Jetpack compose BottomNavigation - java.lang.IllegalStateException: Already attached to lifecycleOwner

                      copy iconCopydownload iconDownload
                      try {
                          // The navigation code that throw this exception
                      } catch (e: IllegalStateException) {
                          if (e.message != "Already attached to lifecycleOwner") {
                              throw e
                          } else {
                              // You can log the exception if you want
                          }
                      }
                      
                      
                      NavigationBarItem(
                          icon = {
                              Icon(painterResource(id = screen.icon), contentDescription = screen.route)
                          },
                          selected = currentRoute == screen.route,
                          onClick = {
                      
                              if (currentRoute == screen.route) {
                                  return@NavigationBarItem
                              }
                      
                              navController.navigate(screen.route) {
                                  popUpTo(navController.graph.findStartDestination().id) {
                                      saveState = true
                                  }
                                  launchSingleTop = true
                                  restoreState = true
                              }
                          }
                      )
                      
                      
                      implementation 'androidx.navigation:navigation-compose:2.5.0-alpha03'
                      
                      implementation 'androidx.navigation:navigation-compose:2.5.0-alpha02'
                      
                      implementation 'androidx.navigation:navigation-compose:2.5.0-alpha03'
                      
                      implementation 'androidx.navigation:navigation-compose:2.5.0-alpha02'
                      

                      Error: MainActivity must extend android.app.Activity [Instantiatable]

                      copy iconCopydownload iconDownload
                      android {
                          lintOptions {
                              disable "Instantiatable"
                          }
                      }
                      

                      Your project requires a newer version of the Kotlin Gradle plugin. (Android Studio)

                      copy iconCopydownload iconDownload
                      classpath 'com.android.tools.build:gradle:4.1.0'
                      
                      distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
                      
                      classpath 'com.android.tools.build:gradle:4.1.0'
                      
                      distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
                      
                      buildscript {
                          ext.kotlin_version = '1.6.10' // Change here
                          repositories {
                              google()
                              jcenter()
                          }
                      
                          dependencies {
                              classpath 'com.android.tools.build:gradle:4.1.0'
                              classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
                          }
                      }
                      
                      Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors
                      e: /home/user/.gradle/caches/transforms-3/36814238b86d8b6b6f9e4e1263bce879/transformed/jetified-kotlinx-coroutines-core-jvm-1.5.2.jar!/META-INF/kotlinx-coroutines-core.kotlin_module: 
                      Module was compiled with an incompatible version of Kotlin. 
                      The binary version of its metadata is 1.5.1, expected version is 1.1.15.
                      
                      buildscript {
                          ext.kotlin_version = '1.6.10' // Change here
                          repositories {
                              google()
                              jcenter()
                          }
                      
                          dependencies {
                              classpath 'com.android.tools.build:gradle:4.1.0'
                              classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
                          }
                      }
                      
                      Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors
                      e: /home/user/.gradle/caches/transforms-3/36814238b86d8b6b6f9e4e1263bce879/transformed/jetified-kotlinx-coroutines-core-jvm-1.5.2.jar!/META-INF/kotlinx-coroutines-core.kotlin_module: 
                      Module was compiled with an incompatible version of Kotlin. 
                      The binary version of its metadata is 1.5.1, expected version is 1.1.15.
                      
                      ext.kotlin_version = '<latest-version>'
                      
                      Execution failed for task ':assets_audio_player:compileDebugKotlin'.
                      
                      ext.kotlin_version = '<latest-version>'
                      
                      Execution failed for task ':assets_audio_player:compileDebugKotlin'.
                      
                      ext.kotlin_version = '1.6.10' //
                      
                       buildscript {
                      ext.kotlin_version = '1.6.10'
                      repositories {
                          google()
                          mavenCentral()
                      }
                      

                      Android app won't build -- The minCompileSdk (31) specified in a dependency's androidx.work:work-runtime:2.7.0-beta01

                      copy iconCopydownload iconDownload
                      dependencies {
                          def work_version = "2.6.0"
                          // Force WorkManager 2.6.0 for transitive dependency
                          implementation("androidx.work:work-runtime-ktx:$work_version") {
                              force = true
                          }
                      }
                      
                         > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
                            > The minCompileSdk (31) specified in a
                              dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
                              is greater than this module's compileSdkVersion (android-30).
                              Dependency: androidx.core:core-ktx:1.7.0-alpha02.
                      
                      configurations.all {
                          resolutionStrategy { force 'androidx.core:core-ktx:1.6.0' }
                      }
                      
                         > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
                            > The minCompileSdk (31) specified in a
                              dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
                              is greater than this module's compileSdkVersion (android-30).
                              Dependency: androidx.core:core-ktx:1.7.0-alpha02.
                      
                      configurations.all {
                          resolutionStrategy { force 'androidx.core:core-ktx:1.6.0' }
                      }
                      
                      api(group: "androidx.work", name: "work-runtime") {
                          version {
                              strictly "2.7.0-alpha04"
                          }
                      }
                      
                      implementation "androidx.core:core-ktx:+" 
                      
                      implementation "androidx.core:core-ktx:1.6.0"
                      
                      implementation "androidx.core:core-ktx:+" ->
                      
                      implementation "androidx.core:core-ktx:1.6.0" 
                      
                      implementation "androidx.core:core-ktx:+" 
                      
                      implementation "androidx.core:core-ktx:1.6.0"
                      
                      implementation "androidx.core:core-ktx:+" ->
                      
                      implementation "androidx.core:core-ktx:1.6.0" 
                      
                      implementation "androidx.core:core-ktx:+" 
                      
                      implementation "androidx.core:core-ktx:1.6.0"
                      
                      implementation "androidx.core:core-ktx:+" ->
                      
                      implementation "androidx.core:core-ktx:1.6.0" 
                      
                      configurations.all {
                              resolutionStrategy { force 'androidx.work:work-runtime:2.6.0' }
                          }
                      
                      android {
                       defaultConfig {
                         //here
                       }
                      }
                      
                      configurations.all {
                              resolutionStrategy { force 'androidx.work:work-runtime:2.6.0' }
                          }
                      
                      android {
                       defaultConfig {
                         //here
                       }
                      }
                      
                      dependencies{
                      implementation 'androidx.work:work-runtime-ktx:2.6.0'
                      }
                      
                      implementation 'androidx.core:core-ktx:1.7.0'  and `api 'com.google.android.material:material:1.4.0-alpha07'`
                      
                      implementation 'androidx.core:core-ktx:1.6.0' and api 'com.google.android.material:material:1.4.0-alpha06'
                      
                      implementation 'androidx.core:core-ktx:1.7.0'  and `api 'com.google.android.material:material:1.4.0-alpha07'`
                      
                      implementation 'androidx.core:core-ktx:1.6.0' and api 'com.google.android.material:material:1.4.0-alpha06'
                      
                      // build.gradle (Module:testApp)
                      
                      android {
                          compileSdkVersion 30
                          buildToolsVersion "30.0.3"
                      
                          defaultConfig {
                              applicationId "myproject.name.testApp"
                              minSdkVersion 16 // <--- must be same as under dependencies section
                              targetSdkVersion 30
                              versionCode 1
                              versionName "1.0"
                      
                      dependencies {
                      
                          implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
                          implementation 'androidx.core:core-ktx:1.6.0' // <--- Was showing 1.7, it fix problem
                          implementation 'androidx.appcompat:appcompat:1.3.1'
                      
                      implementation "androidx.paging:paging-compose:1.0.0-alpha10"
                      
                      implementation 'androidx.core:core-ktx:1.6.0'
                      implementation 'androidx.appcompat:appcompat:1.3.1'
                      implementation 'com.google.android.material:material:1.4.0'
                      implementation "androidx.compose.ui:ui:$compose_version"
                      implementation "androidx.compose.material:material:$compose_version"
                      implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
                      implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
                      implementation 'androidx.activity:activity-compose:1.3.1'
                      implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
                      testImplementation 'junit:junit:4.+'
                      androidTestImplementation 'androidx.test.ext:junit:1.1.3'
                      androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
                      androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
                      debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
                      
                      implementation "androidx.paging:paging-compose:1.0.0-alpha10"
                      
                      implementation 'androidx.core:core-ktx:1.6.0'
                      implementation 'androidx.appcompat:appcompat:1.3.1'
                      implementation 'com.google.android.material:material:1.4.0'
                      implementation "androidx.compose.ui:ui:$compose_version"
                      implementation "androidx.compose.material:material:$compose_version"
                      implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
                      implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
                      implementation 'androidx.activity:activity-compose:1.3.1'
                      implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
                      testImplementation 'junit:junit:4.+'
                      androidTestImplementation 'androidx.test.ext:junit:1.1.3'
                      androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
                      androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
                      debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
                      
                      implementation 'androidx.core:core-ktx:1.7.0'
                      
                      implementation 'androidx.core:core-ktx:1.6.0'
                      
                      implementation 'androidx.core:core-ktx:1.7.0'
                      
                      implementation 'androidx.core:core-ktx:1.6.0'
                      
                       implementation 'androidx.appcompat:appcompat:1.4.0'
                      
                      implementation 'androidx.appcompat:appcompat:1.3.1'
                      
                       implementation 'androidx.appcompat:appcompat:1.4.0'
                      
                      implementation 'androidx.appcompat:appcompat:1.3.1'
                      
                      Dependency: androidx.appcompat:appcompat:1.4.0.
                      
                      dependencies {
                      
                          implementation 'androidx.appcompat:appcompat:1.3.0'
                          ...
                          ...
                          ...
                      
                          /* The minCompileSdk (31) specified in a
                          dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
                          is greater than this module's compileSdkVersion (android-30).
                          Dependency: androidx.appcompat:appcompat:1.4.0.  */
                      
                      }
                      
                      Dependency: androidx.appcompat:appcompat:1.4.0.
                      
                      dependencies {
                      
                          implementation 'androidx.appcompat:appcompat:1.3.0'
                          ...
                          ...
                          ...
                      
                          /* The minCompileSdk (31) specified in a
                          dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
                          is greater than this module's compileSdkVersion (android-30).
                          Dependency: androidx.appcompat:appcompat:1.4.0.  */
                      
                      }
                      
                          compileSdkVersion 29
                      
                          targetSdkVersion 29
                      
                          implementation 'com.google.android.gms:play-services-ads-lite:20.5.0'
                      
                      
                      configurations.all {
                          resolutionStrategy { force 'androidx.work:work-runtime:2.6.0' }
                          resolutionStrategy { force 'androidx.core:core-ktx:1.6.0' }
                      }
                      
                          compileSdkVersion 29
                      
                          targetSdkVersion 29
                      
                          implementation 'com.google.android.gms:play-services-ads-lite:20.5.0'
                      
                      
                      configurations.all {
                          resolutionStrategy { force 'androidx.work:work-runtime:2.6.0' }
                          resolutionStrategy { force 'androidx.core:core-ktx:1.6.0' }
                      }
                      
                       implementation 'androidx.core:core-ktx:1.7.0'
                       implementation 'androidx.appcompat:appcompat:1.4.0'
                      
                      implementation 'androidx.core:core-ktx:1.6.0'
                      implementation 'androidx.appcompat:appcompat:1.3.0'
                      
                       implementation 'androidx.core:core-ktx:1.7.0'
                       implementation 'androidx.appcompat:appcompat:1.4.0'
                      
                      implementation 'androidx.core:core-ktx:1.6.0'
                      implementation 'androidx.appcompat:appcompat:1.3.0'
                      
                      android {
                      compileSdkVersion 31 // Changed to 31
                      
                      sourceSets {
                          main.java.srcDirs += 'src/main/kotlin'
                      }
                      
                      defaultConfig {
                          applicationId "com.example.blah_blah"
                          minSdkVersion 16
                          targetSdkVersion 31  //Changed to 31
                          versionCode flutterVersionCode.toInteger()
                          versionName flutterVersionName
                      }
                      
                      buildTypes {
                          release {
                              // TODO: Add your own signing config for the release build.
                              // Signing with the debug keys for now, so `flutter run --release` works.
                              signingConfig signingConfigs.debug
                          }
                      }
                      
                      buildscript {
                      ext.kotlin_version = '1.6.10' //change here
                      repositories {
                          google()
                          jcenter()
                      }
                      
                      dependencies {
                          classpath 'com.android.tools.build:gradle:4.1.0'
                          classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
                      }
                      
                      android {
                      compileSdkVersion 31 // Changed to 31
                      
                      sourceSets {
                          main.java.srcDirs += 'src/main/kotlin'
                      }
                      
                      defaultConfig {
                          applicationId "com.example.blah_blah"
                          minSdkVersion 16
                          targetSdkVersion 31  //Changed to 31
                          versionCode flutterVersionCode.toInteger()
                          versionName flutterVersionName
                      }
                      
                      buildTypes {
                          release {
                              // TODO: Add your own signing config for the release build.
                              // Signing with the debug keys for now, so `flutter run --release` works.
                              signingConfig signingConfigs.debug
                          }
                      }
                      
                      buildscript {
                      ext.kotlin_version = '1.6.10' //change here
                      repositories {
                          google()
                          jcenter()
                      }
                      
                      dependencies {
                          classpath 'com.android.tools.build:gradle:4.1.0'
                          classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
                      }
                      
                      configurations.all {
                              resolutionStrategy { force 'androidx.work:work-runtime:2.6.0' }
                          }
                      
                      android {
                       defaultConfig {
                         //here
                       }
                      }
                      
                      configurations.all {
                              resolutionStrategy { force 'androidx.work:work-runtime:2.6.0' }
                          }
                      
                      android {
                       defaultConfig {
                         //here
                       }
                      }
                      
                      implementation 'androidx.appcompat:appcompat:1.4.1'
                      implementation 'com.google.android.material:material:1.5.0'
                      
                      implementation 'androidx.appcompat:appcompat:1.3.1'
                      implementation 'com.google.android.material:material:1.4.0'
                      
                      implementation 'androidx.appcompat:appcompat:1.4.1'
                      implementation 'com.google.android.material:material:1.5.0'
                      
                      implementation 'androidx.appcompat:appcompat:1.3.1'
                      implementation 'com.google.android.material:material:1.4.0'
                      

                      Unable to load class AndroidComponentsExtension after upgrading the Android Gradle Plugin 7.1

                      copy iconCopydownload iconDownload
                      Caused by: java.lang.NoClassDefFoundError: com/android/build/api/extension/AndroidComponentsExtension
                          at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:73)
                          at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:42)
                      
                      dependencies {
                          classpath 'com.android.tools.build:gradle:7.1.0'
                      
                          // Update this line to use 2.4.1
                          classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.4.1"
                      }
                      
                      classpath "com.google.firebase:perf-plugin:1.4.0"
                      
                      Caused by: java.lang.NoClassDefFoundError: com/android/build/api/extension/AndroidComponentsExtension
                          at com.google.firebase.perf.plugin.FirebasePerfClassVisitorFactory.registerForProject(FirebasePerfClassVisitorFactory.java:54)
                          at com.google.firebase.perf.plugin.FirebasePerfPlugin.perform(FirebasePerfPlugin.java:145)
                          at com.google.firebase.perf.plugin.FirebasePerfPlugin.lambda$apply$0(FirebasePerfPlugin.java:107)
                      
                      classpath "com.google.firebase:perf-plugin:1.4.1"
                      
                      Caused by: java.lang.NoClassDefFoundError: com/android/build/api/extension/AndroidComponentsExtension
                          at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:73)
                          at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:42)
                      
                      dependencies {
                          classpath 'com.android.tools.build:gradle:7.1.0'
                      
                          // Update this line to use 2.4.1
                          classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.4.1"
                      }
                      
                      classpath "com.google.firebase:perf-plugin:1.4.0"
                      
                      Caused by: java.lang.NoClassDefFoundError: com/android/build/api/extension/AndroidComponentsExtension
                          at com.google.firebase.perf.plugin.FirebasePerfClassVisitorFactory.registerForProject(FirebasePerfClassVisitorFactory.java:54)
                          at com.google.firebase.perf.plugin.FirebasePerfPlugin.perform(FirebasePerfPlugin.java:145)
                          at com.google.firebase.perf.plugin.FirebasePerfPlugin.lambda$apply$0(FirebasePerfPlugin.java:107)
                      
                      classpath "com.google.firebase:perf-plugin:1.4.1"
                      
                      Caused by: java.lang.NoClassDefFoundError: com/android/build/api/extension/AndroidComponentsExtension
                          at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:73)
                          at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:42)
                      
                      dependencies {
                          classpath 'com.android.tools.build:gradle:7.1.0'
                      
                          // Update this line to use 2.4.1
                          classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.4.1"
                      }
                      
                      classpath "com.google.firebase:perf-plugin:1.4.0"
                      
                      Caused by: java.lang.NoClassDefFoundError: com/android/build/api/extension/AndroidComponentsExtension
                          at com.google.firebase.perf.plugin.FirebasePerfClassVisitorFactory.registerForProject(FirebasePerfClassVisitorFactory.java:54)
                          at com.google.firebase.perf.plugin.FirebasePerfPlugin.perform(FirebasePerfPlugin.java:145)
                          at com.google.firebase.perf.plugin.FirebasePerfPlugin.lambda$apply$0(FirebasePerfPlugin.java:107)
                      
                      classpath "com.google.firebase:perf-plugin:1.4.1"
                      
                      Caused by: java.lang.NoClassDefFoundError: com/android/build/api/extension/AndroidComponentsExtension
                          at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:73)
                          at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:42)
                      
                      dependencies {
                          classpath 'com.android.tools.build:gradle:7.1.0'
                      
                          // Update this line to use 2.4.1
                          classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.4.1"
                      }
                      
                      classpath "com.google.firebase:perf-plugin:1.4.0"
                      
                      Caused by: java.lang.NoClassDefFoundError: com/android/build/api/extension/AndroidComponentsExtension
                          at com.google.firebase.perf.plugin.FirebasePerfClassVisitorFactory.registerForProject(FirebasePerfClassVisitorFactory.java:54)
                          at com.google.firebase.perf.plugin.FirebasePerfPlugin.perform(FirebasePerfPlugin.java:145)
                          at com.google.firebase.perf.plugin.FirebasePerfPlugin.lambda$apply$0(FirebasePerfPlugin.java:107)
                      
                      classpath "com.google.firebase:perf-plugin:1.4.1"
                      
                      Caused by: java.lang.NoClassDefFoundError: com/android/build/api/extension/AndroidComponentsExtension
                          at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:73)
                          at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:42)
                      
                      dependencies {
                          classpath 'com.android.tools.build:gradle:7.1.0'
                      
                          // Update this line to use 2.4.1
                          classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.4.1"
                      }
                      
                      classpath "com.google.firebase:perf-plugin:1.4.0"
                      
                      Caused by: java.lang.NoClassDefFoundError: com/android/build/api/extension/AndroidComponentsExtension
                          at com.google.firebase.perf.plugin.FirebasePerfClassVisitorFactory.registerForProject(FirebasePerfClassVisitorFactory.java:54)
                          at com.google.firebase.perf.plugin.FirebasePerfPlugin.perform(FirebasePerfPlugin.java:145)
                          at com.google.firebase.perf.plugin.FirebasePerfPlugin.lambda$apply$0(FirebasePerfPlugin.java:107)
                      
                      classpath "com.google.firebase:perf-plugin:1.4.1"
                      
                      // Top-level build file where you can add configuration options common to all sub-projects/modules.
                      plugins {
                          id 'com.android.application' version '7.1.0' apply false
                          id 'com.android.library' version '7.1.0' apply false
                          id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
                          id "com.google.dagger.hilt.android" version '2.41' apply false
                          id 'androidx.navigation.safeargs.kotlin' version '2.4.0' apply false // use this one
                      //    classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.4.0" (will not work now)
                      
                      }
                      
                      task clean(type: Delete) {
                          delete rootProject.buildDir
                      }
                      
                      I fixed the issue by downgrading the version of navigation to 2.3.5
                      
                          def nav_version = "2.3.5"
                      
                      Caused by: java.lang.NoClassDefFoundError: com/android/build/api/extension/AndroidComponentsExtension
                          at dagger.hilt.android.plugin.HiltGradlePlugin.configureBytecodeTransformASM(HiltGradlePlugin.kt:257)
                      
                      org.gradle.api.GradleScriptException: A problem occurred evaluating project ':app'.
                          at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:93)
                          at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.lambda$apply$0(DefaultScriptPluginFactory.java:133)
                          at ...
                      Caused by: java.lang.NoClassDefFoundError: com/android/build/api/extension/AndroidComponentsExtension
                          at com.google.firebase.perf.plugin.FirebasePerfClassVisitorFactory.registerForProject(FirebasePerfClassVisitorFactory.java:54)
                          at com.google.firebase.perf.plugin.FirebasePerfPlugin.perform(FirebasePerfPlugin.java:145)
                          at com.google.firebase.perf.plugin.FirebasePerfPlugin.lambda$apply$0(FirebasePerfPlugin.java:107)
                          at org.gradle.api.internal.plugins.DefaultPluginManager$2.execute(DefaultPluginManager.java:258)
                          at ...
                      

                      Espresso UI Test Cancelled with no error message

                      copy iconCopydownload iconDownload
                      java.lang.NoSuchMethodError: No static method registerDefaultInstance(Ljava/lang/Class;Lcom/google/protobuf/GeneratedMessageLite;)V in class Lcom/google/protobuf/GeneratedMessageLite; or its super classes (declaration of 'com.google.protobuf.GeneratedMessageLite' appears in /data/app/~~BuZ1RxiHRJybZNpyUcjGIw==/-xuI8WeeYUojtsn-ncVI-aw==/base.apk)
                      01-30 08:23:34.286  5932  6012 E AndroidRuntime:    at com.google.firebase.perf.v1.ApplicationInfo.<clinit>(ApplicationInfo.java:1085)
                      01-30 08:23:34.286  5932  6012 E AndroidRuntime:    at com.google.firebase.perf.v1.ApplicationInfo.newBuilder(ApplicationInfo.java:533)
                      01-30 08:23:34.286  5932  6012 E AndroidRuntime:    at com.google.firebase.perf.transport.TransportManager.finishInitialization(TransportManager.java:226)
                      01-30 08:23:34.286  5932  6012 E AndroidRuntime:    at com.google.firebase.perf.transport.TransportManager.syncInit(TransportManager.java:220)
                      01-30 08:23:34.286  5932  6012 E AndroidRuntime:    at com.google.firebase.perf.transport.TransportManager.$r8$lambda$LuAwHBxy50Yf-ziHqcD54KjEPtk(Unknown Source:0)
                      01-30 08:23:34.286  5932  6012 E AndroidRuntime:    at com.google.firebase.perf.transport.TransportManager$$ExternalSyntheticLambda1.run(Unknown Source:2)
                      01-30 08:23:34.286  5932  6012 E AndroidRuntime:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
                      01-30 08:23:34.286  5932  6012 E AndroidRuntime:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
                      01-30 08:23:34.286  5932  6012 E AndroidRuntime:    at java.lang.Thread.run(Thread.java:920)
                      
                      androidTestImplementation ("androidx.test.espresso:espresso-contrib:3.4.0") {
                          exclude module: "protobuf-lite"
                      }
                      
                      java.lang.NoSuchMethodError: No static method registerDefaultInstance(Ljava/lang/Class;Lcom/google/protobuf/GeneratedMessageLite;)V in class Lcom/google/protobuf/GeneratedMessageLite; or its super classes (declaration of 'com.google.protobuf.GeneratedMessageLite' appears in /data/app/~~BuZ1RxiHRJybZNpyUcjGIw==/-xuI8WeeYUojtsn-ncVI-aw==/base.apk)
                      01-30 08:23:34.286  5932  6012 E AndroidRuntime:    at com.google.firebase.perf.v1.ApplicationInfo.<clinit>(ApplicationInfo.java:1085)
                      01-30 08:23:34.286  5932  6012 E AndroidRuntime:    at com.google.firebase.perf.v1.ApplicationInfo.newBuilder(ApplicationInfo.java:533)
                      01-30 08:23:34.286  5932  6012 E AndroidRuntime:    at com.google.firebase.perf.transport.TransportManager.finishInitialization(TransportManager.java:226)
                      01-30 08:23:34.286  5932  6012 E AndroidRuntime:    at com.google.firebase.perf.transport.TransportManager.syncInit(TransportManager.java:220)
                      01-30 08:23:34.286  5932  6012 E AndroidRuntime:    at com.google.firebase.perf.transport.TransportManager.$r8$lambda$LuAwHBxy50Yf-ziHqcD54KjEPtk(Unknown Source:0)
                      01-30 08:23:34.286  5932  6012 E AndroidRuntime:    at com.google.firebase.perf.transport.TransportManager$$ExternalSyntheticLambda1.run(Unknown Source:2)
                      01-30 08:23:34.286  5932  6012 E AndroidRuntime:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
                      01-30 08:23:34.286  5932  6012 E AndroidRuntime:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
                      01-30 08:23:34.286  5932  6012 E AndroidRuntime:    at java.lang.Thread.run(Thread.java:920)
                      
                      androidTestImplementation ("androidx.test.espresso:espresso-contrib:3.4.0") {
                          exclude module: "protobuf-lite"
                      }
                      

                      android:exported needs to be explicitly specified for &lt;activity&gt;. Apps targeting Android 12 and higher are required to specify

                      copy iconCopydownload iconDownload
                      <receiver android:name="<name_of_the_entry>"
                                      android:exported="false or true"
                                      tools:node="merge" />
                      
                           <activity
                                      android:name="<activity which is giving error>"
                                      android:exported="true"
                                      tools:node="merge" />
                      
                      <activity android:name="name_of_the_activity_inside_library>"
                          android:exported="false|true"
                          tools:node="merge" />
                      
                      debugImplementation "androidx.fragment:fragment-testing:<version>"
                      
                      androidTestImplementation "androidx.fragment:fragment-testing:<version>"
                      
                      debugImplementation "androidx.fragment:fragment-testing:<version>"
                      
                      androidTestImplementation "androidx.fragment:fragment-testing:<version>"
                      
                       android:exported="true"
                      
                      androidTestImplementation "androidx.test.ext:junit:1.1.3"
                      androidTestImplementation "androidx.compose.ui:ui-test-junit4:1.0.4"
                      
                      > java.util.concurrent.ExecutionException: com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/xxxxx.tmp/base.apk (at Binary XML file line #129): YOUR.FULLY.QUALIFIED.NAME.FAILING.ACTIVITY: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present
                      
                      <activity android:name="androidx.test.core.app.InstrumentationActivityInvoker$BootstrapActivity"
                      android:exported="true"
                      tools:node="merge"/>
                      
                      <activity android:name="androidx.test.core.app.InstrumentationActivityInvoker$EmptyActivity"
                      android:exported="true"
                      tools:node="merge"/>
                      
                      <activity android:name="androidx.test.core.app.InstrumentationActivityInvoker$EmptyFloatingActivity"
                      android:exported="true"
                      tools:node="merge"/>
                      
                       <activity
                              android:name="com.test.activity.SplashActivity"
                              android:clearTaskOnLaunch="true"
                              android:label="@string/app_name"
                              android:launchMode="singleTop"
                              android:noHistory="true"
                              android:screenOrientation="portrait"
                              android:theme="@style/AppTheme.NoActionBar"
                              android:exported="true">
                      
                         <receiver
                              android:name="com.test.receiver.ShareReceiver"
                              android:exported="true">
                              <intent-filter>
                                  <action android:name="com.test.fcm.android.action.broadcast" />
                              </intent-filter>
                          </receiver>
                      
                         <service
                              android:name="com.google.android.gms.tagmanager.InstallReferrerService"
                              android:exported="true" />
                      
                      testImplementation 'junit:junit:4.13.2' 
                      androidTestImplementation 'androidx.test:runner:1.4.0'
                      androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
                      implementation 'com.razorpay:checkout:1.6.15'
                      
                       <activity
                              android:name="com.test.activity.SplashActivity"
                              android:clearTaskOnLaunch="true"
                              android:label="@string/app_name"
                              android:launchMode="singleTop"
                              android:noHistory="true"
                              android:screenOrientation="portrait"
                              android:theme="@style/AppTheme.NoActionBar"
                              android:exported="true">
                      
                         <receiver
                              android:name="com.test.receiver.ShareReceiver"
                              android:exported="true">
                              <intent-filter>
                                  <action android:name="com.test.fcm.android.action.broadcast" />
                              </intent-filter>
                          </receiver>
                      
                         <service
                              android:name="com.google.android.gms.tagmanager.InstallReferrerService"
                              android:exported="true" />
                      
                      testImplementation 'junit:junit:4.13.2' 
                      androidTestImplementation 'androidx.test:runner:1.4.0'
                      androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
                      implementation 'com.razorpay:checkout:1.6.15'
                      
                       <activity
                              android:name="com.test.activity.SplashActivity"
                              android:clearTaskOnLaunch="true"
                              android:label="@string/app_name"
                              android:launchMode="singleTop"
                              android:noHistory="true"
                              android:screenOrientation="portrait"
                              android:theme="@style/AppTheme.NoActionBar"
                              android:exported="true">
                      
                         <receiver
                              android:name="com.test.receiver.ShareReceiver"
                              android:exported="true">
                              <intent-filter>
                                  <action android:name="com.test.fcm.android.action.broadcast" />
                              </intent-filter>
                          </receiver>
                      
                         <service
                              android:name="com.google.android.gms.tagmanager.InstallReferrerService"
                              android:exported="true" />
                      
                      testImplementation 'junit:junit:4.13.2' 
                      androidTestImplementation 'androidx.test:runner:1.4.0'
                      androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
                      implementation 'com.razorpay:checkout:1.6.15'
                      
                      "com.google.dagger:hilt-android:2.38.1"
                      "com.google.dagger:hilt-android-gradle-plugin:2.38.1"
                      "com.google.dagger:hilt-android-compiler:2.38.1"
                      "com.google.dagger:hilt-android-testing:2.38.1"
                      
                      "com.google.dagger:hilt-android:2.40.5"
                      "com.google.dagger:hilt-android-gradle-plugin:2.40.5"
                      "com.google.dagger:hilt-android-compiler:2.40.5"
                      "com.google.dagger:hilt-android-testing:2.40.5" 
                      
                      "com.google.dagger:hilt-android:2.38.1"
                      "com.google.dagger:hilt-android-gradle-plugin:2.38.1"
                      "com.google.dagger:hilt-android-compiler:2.38.1"
                      "com.google.dagger:hilt-android-testing:2.38.1"
                      
                      "com.google.dagger:hilt-android:2.40.5"
                      "com.google.dagger:hilt-android-gradle-plugin:2.40.5"
                      "com.google.dagger:hilt-android-compiler:2.40.5"
                      "com.google.dagger:hilt-android-testing:2.40.5" 
                      
                      <receiver
                          android:name="com.razorpay.RzpTokenReceiver"
                          android:exported="false">
                          <intent-filter>
                              <action android:name="rzp.device_token.share" />
                          </intent-filter>
                      </receiver>
                      
                      <activity
                          android:name="com.razorpay.CheckoutActivity"
                          android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
                          android:exported="true"
                          android:theme="@style/CheckoutTheme">
                          <intent-filter>
                              <action android:name="android.intent.action.MAIN" />
                              <data
                                  android:host="rzp.io"
                                  android:scheme="io.rzp" />
                          </intent-filter>
                      </activity>
                      
                      android:exported="true" <!-- or false as required -->
                      
                      <activity
                           android:name=".MainActivity"
                           android:exported="true" <** add this line on AndroidManifest.xml**
                           android:launchMode="singleTop"
                           android:theme="@style/LaunchTheme"
                       </activity>
                      

                      One or more issues found when checking AAR metadata values:

                      copy iconCopydownload iconDownload
                         compileSdk 31
                      
                          defaultConfig {
                              applicationId "com.example.lifecycle"
                              minSdk 21
                              targetSdk 30
                              versionCode 1
                              versionName "1.0"
                      
                              testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
                          }
                      

                      Could not resolve com.google.guava:guava:30.1-jre - Gradle project sync failed. Basic functionality will not work properly - in kotlin project

                      copy iconCopydownload iconDownload
                          repositories {
                              mavenCentral()
                              google()
                          }
                      
                      
                      // Top-level build file where you can add configuration options common to all sub-projects/modules.
                      buildscript {
                          repositories {
                              mavenCentral()
                              google()
                          }
                          dependencies {
                              classpath 'com.android.tools.build:gradle:7.1.1'
                      
                              // NOTE: Do not place your application dependencies here; they belong
                              // in the individual module build.gradle files
                          }
                      }
                      
                      allprojects {
                          repositories {
                              mavenCentral()
                              google()
                          }
                      }
                      
                      task clean(type: Delete) {
                          delete rootProject.buildDir
                      }
                      

                      Community Discussions

                      Trending Discussions on androidx
                      • Unknown host CPU architecture: arm64 , Android NDK SiliconM1 Apple MacBook Pro
                      • Jetpack compose BottomNavigation - java.lang.IllegalStateException: Already attached to lifecycleOwner
                      • Error: MainActivity must extend android.app.Activity [Instantiatable]
                      • Your project requires a newer version of the Kotlin Gradle plugin. (Android Studio)
                      • Android app won't build -- The minCompileSdk (31) specified in a dependency's androidx.work:work-runtime:2.7.0-beta01
                      • Unable to load class AndroidComponentsExtension after upgrading the Android Gradle Plugin 7.1
                      • Espresso UI Test Cancelled with no error message
                      • android:exported needs to be explicitly specified for &lt;activity&gt;. Apps targeting Android 12 and higher are required to specify
                      • One or more issues found when checking AAR metadata values:
                      • Could not resolve com.google.guava:guava:30.1-jre - Gradle project sync failed. Basic functionality will not work properly - in kotlin project
                      Trending Discussions on androidx

                      QUESTION

                      Unknown host CPU architecture: arm64 , Android NDK SiliconM1 Apple MacBook Pro

                      Asked 2022-Apr-04 at 18:41

                      I've got a project that is working fine in windows os but when I switched my laptop and opened an existing project in MacBook Pro M1. I'm unable to run an existing android project in MacBook pro M1. first I was getting

                      Execution failed for task ':app:kaptDevDebugKotlin'. > A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution > java.lang.reflect.InvocationTargetException (no error message)

                      this error was due to the Room database I applied a fix that was adding below library before Room database and also changed my JDK location from file structure from JRE to JDK.

                      kapt "org.xerial:sqlite-jdbc:3.34.0"

                         //Room components
                          kapt "org.xerial:sqlite-jdbc:3.34.0"
                          implementation "androidx.room:room-ktx:$rootProject.roomVersion"
                          kapt "androidx.room:room-compiler:$rootProject.roomVersion"
                          androidTestImplementation "androidx.room:room-testing:$rootProject.roomVersion"
                      

                      after that now I'm getting an issue which is Unknown host CPU architecture: arm64

                      there is an SDK in my project that is using this below line.

                      android {
                          externalNativeBuild {
                              ndkBuild {
                                 path 'Android.mk'
                              }
                          }
                          ndkVersion '21.4.7075529'
                      
                      
                      }
                      

                      App Gradle

                       externalNativeBuild {
                              cmake {
                                  path "src/main/cpp/CMakeLists.txt"
                                  version "3.18.1"
                                  //version "3.10.2"
                              }
                          }
                      

                      [CXX1405] error when building with ndkBuild using /Users/mac/Desktop/Consumer-Android/ime/dictionaries/jnidictionaryv2/Android.mk: Build command failed. Error while executing process /Users/mac/Library/Android/sdk/ndk/21.4.7075529/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/mac/Desktop/Consumer-Android/ime/dictionaries/jnidictionaryv2/Android.mk APP_ABI=arm64-v8a NDK_ALL_ABIS=arm64-v8a NDK_DEBUG=1 APP_PLATFORM=android-21 NDK_OUT=/Users/mac/Desktop/Consumer-Android/ime/dictionaries/jnidictionaryv2/build/intermediates/cxx/Debug/4k4s2lc6/obj NDK_LIBS_OUT=/Users/mac/Desktop/Consumer-Android/ime/dictionaries/jnidictionaryv2/build/intermediates/cxx/Debug/4k4s2lc6/lib APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n} ERROR: Unknown host CPU architecture: arm64

                      which is causing this issue and whenever I comment on this line

                      path 'Android.mk'

                      it starts working fine, is there any way around which will help me run this project with this piece of code without getting this NDK issue?

                      Update - It seems that Room got fixed in the latest updates, Therefore you may consider updating Room to latest version (2.3.0-alpha01 / 2.4.0-alpha03 or above)

                      GitHub Issue Tracker

                      ANSWER

                      Answered 2022-Apr-04 at 18:41

                      To solve this on a Apple Silicon M1 I found three options

                      A

                      Use NDK 24

                      android {
                          ndkVersion "24.0.8215888"
                          ...
                      }
                      

                      You can install it with

                      echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;24.0.8215888'
                      

                      or

                      echo "y" | sudo ${ANDROID_HOME}/sdk/cmdline-tools/latest/bin/sdkmanager --install 'ndk;24.0.8215888'
                      

                      Depending what where sdkmanager is located enter image description here

                      B

                      Change your ndk-build to use Rosetta x86. Search for your installed ndk with

                      find ~ -name ndk-build 2>/dev/null
                      

                      eg

                      vi ~/Library/Android/sdk/ndk/22.1.7171670/ndk-build
                      

                      and change

                      DIR="$(cd "$(dirname "$0")" && pwd)"
                      $DIR/build/ndk-build "$@"
                      

                      to

                      DIR="$(cd "$(dirname "$0")" && pwd)"
                      arch -x86_64 /bin/bash $DIR/build/ndk-build "$@"
                      

                      enter image description here

                      C

                      convert your ndk-build into a cmake build

                      Source https://stackoverflow.com/questions/69541831

                      Community Discussions, Code Snippets contain sources that include Stack Exchange Network

                      Vulnerabilities

                      No vulnerabilities reported

                      Install androidx

                      You can do most of your work from Android Studio, however you can also build the full AndroidX library from command line:.

                      Support

                      For contributions via GitHub, see the GitHub Contribution Guide.

                      DOWNLOAD this Library from

                      Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
                      over 430 million Knowledge Items
                      Find more libraries
                      Reuse Solution Kits and Libraries Curated by Popular Use Cases
                      Explore Kits

                      Save this library and start creating your kit

                      Share this Page

                      share link
                      Consider Popular Kotlin Libraries
                      Try Top Libraries by androidx
                      Compare Kotlin Libraries with Highest Support
                      Compare Kotlin Libraries with Highest Quality
                      Compare Kotlin Libraries with Highest Security
                      Compare Kotlin Libraries with Permissive License
                      Compare Kotlin Libraries with Highest Reuse
                      Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
                      over 430 million Knowledge Items
                      Find more libraries
                      Reuse Solution Kits and Libraries Curated by Popular Use Cases
                      Explore Kits

                      Save this library and start creating your kit

                      • © 2022 Open Weaver Inc.