I am facing the below error form yesterday when I am trying to run the project.
Execution failed for task ':app:checkDEVDebugAarMetadata'.
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.browser:browser:1.4.0-alpha01.
AAR metadata file: /Users/mac/.gradle/caches/transforms-2/files-2.1/fafe0388b6cc91ea7309174cddb01b56/browser-1.4.0-alpha01/META-INF/com/android/build/gradle/aar-metadata.properties.
Please help if anyone know this fix without update compileSdkVersion.
The Metro bundler runs on port 8081. If another process is already using that port, you can either terminate that process, or change the port that the bundler uses.
Can React Native be used for web and mobile? Yes! With React Native for Web, developers can write a single React Native application that can run natively on Android and iOS, as well as on a web browser using standard web technologies.
I just fixed the issue with below code added to my android/app/build.gradle
file inside android block:
android{
// ....Existing codes
configurations.all {
resolutionStrategy {
force 'androidx.browser:browser:1.2.0'
}
}
}
Hope it help others as form September 15, 2021 a new version released for androidx.browser:1.4.0-alpha01
it contains minSDK version 31, it may causes the error.
I fixed it by adding this code to the android/app/build.gradle
dependencies{
...other dependencies,
implementation ("androidx.browser:browser:1.3.0"){
force = true
}
}
This happens because there is an recent update to the androidx.browser as of September 15, 2021 that require minSDK 31
You can also specify which version of androidx.browser you want to use in android/build.gradle like this:
buildscript {
ext {
...other versions
androidXBrowser = "1.3.0"
}
}
Add following config to android/app/build.gradle
defaultConfig {
// ... existing config
configurations.all {
resolutionStrategy { force 'androidx.browser:browser:1.3.0' }
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With