Home > Blockchain >  What is androidx.browser and how to resolve this error Task :app:checkDebugAarMetadata FAILED?
What is androidx.browser and how to resolve this error Task :app:checkDebugAarMetadata FAILED?

Time:11-12

Configuration on demand is an incubating feature.

Task :app:checkDebugAarMetadata FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.7.1/userguide/command_line_interface.html#sec:command_line_warnings 43 actionable tasks: 2 executed, 41 up-to-date

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:checkDebugAarMetadata'.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction The minCompileSdk (33) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-31). Dependency: androidx.browser:browser:1.5.0-alpha01. AAR metadata file: C:\Users\akshay.patel.gradle\caches\transforms-2\files-2.1\41677513f37fd3ff659f9e9ccebf1218\browser-1.5.0-alpha01\META-INF\com\android\build\gradle\aar-metadata.properties.

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 28s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8088

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:checkDebugAarMetadata'.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
The minCompileSdk (33) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-31). Dependency: androidx.browser:browser:1.5.0-alpha01. AAR metadata file: C:\Users\akshay.patel.gradle\caches\transforms-2\files-2.1\41677513f37fd3ff659f9e9ccebf1218\browser-1.5.0-alpha01\META-INF\com\android\build\gradle\aar-metadata.properties.

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 28s

at makeError (D:\User\mobile\node_modules\execa\index.js:174:9)
at D:\User\mobile\node_modules\execa\index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async runOnAllDevices (D:\\mobile\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (D:\User\mobile\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:142:9)

info Run CLI with --verbose flag for more details. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] dev-local: npx react-native run-android --port=8088 npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] dev-local script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\akshay.patel\AppData\Roaming\npm-cache_logs\2022-11-03T08_05_27_690Z-debug.log

Yes I tried updating my build.gradle by

android {
    compileSdk = "33"

    defaultConfig {
        targetSdk = "33"
    }
}

but I still get the same error please help Thanks in advance

CodePudding user response:

I got the root cause of the above problem that androidx.browser so I have resolved this by adding the below code snippet in android/app/build.gradle file

configurations.all {
        resolutionStrategy { force 'androidx.browser:browser:1.4.0' }
    }
  • Related