I have follow all the steps for install detox on my app and i read that detox accept minsdkVersion >= 18 , and my project runs minsdkVersion = 19 . I tried everything eve this guide for solving errors link to the detox doc but always this error showed up when i biuld the app on release and degub (yarn detox build --configuration android.emu.debug):
Error: uses-sdk:minSdkVersion 19 cannot be smaller than version 21 declared in library [com.wix:detox:20.13.1] /Users/user/.gradle/caches/transforms-2/files-2.1/f152bf0c894bece89167cc89d4b2917b/jetified-detox-20.13.1/AndroidManifest.xml as the library might be using APIs not available in 19 Suggestion: use a compatible library with a minSdk of at most 19, or increase this project's minSdk version to at least 21, or use tools:overrideLibrary="com.wix.detox" to force usage (may lead to runtime failures)
My android/build gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "29.0.3"
minSdkVersion = 19
compileSdkVersion = 33
targetSdkVersion = 33
kotlinVersion = "1.6.21"
}
repositories {
google()
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:3.5.4")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
subprojects {
afterEvaluate {project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 33
buildToolsVersion '29.0.3'
}
}
}
}
allprojects {
// afterEvaluate {
// if (it.hasProperty('android')){
// android {
// defaultConfig {
// minSdkVersion 21
// }
// }
// }
// }
repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
google()
maven {url("$rootDir/../node_modules/detox/Detox-android")}
jcenter()
maven { url 'https://jitpack.io' }
exclusiveContent {
filter {
includeGroup "com.facebook.react"
}
forRepository {
maven {
url "$rootDir/../node_modules/react-native/android"
}
}
}
}
}
wrapper{
gradleVersion = '4.4'
distributionUrl = distributionUrl.replace("bin", "all")
}
project.ext {
excludeAppGlideModule = true
}