Gradle detected a problem with the following location: 'C:\React-Projects\English-Muni\android\app\build\intermediates\ReactNativeVectorIcons'.
Reason: Task ':app:lintVitalAnalyzeRelease' uses this output of task ':app:copyReactNativeVectorIconFonts' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
Possible solutions:
Please refer to https://docs.gradle.org/8.0.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
Here is the app/build.gradle file
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: "com.android.application"
apply plugin: "com.facebook.react"
import com.android.build.OutputFile
android {
ndkVersion rootProject.ext.ndkVersion
compileSdkVersion rootProject.ext.compileSdkVersion
namespace "com.englishmuni"
defaultConfig {
applicationId "com.englishmuni"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 36
versionName "1.0.32"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED",
isNewArchitectureEnabled().toString()
multiDexEnabled true
}
}
}
dependencies {
implementation project(':react-native-vector-icons')
}
apply from: file("../../node_modules/@react-native-community/cli-platform-
android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
Here is the simpler patch that works for variants on RN 0.72,for vector icons. You have to replace these lines in /node_modules/react-native-vector-icons/fonts.gradle
afterEvaluate {
.
.
.
android.applicationVariants.all { def variant ->
def targetName = variant.name.capitalize()
def lintVitalAnalyzeTask = tasks.findByName("lintVitalAnalyze${targetName}")
if (lintVitalAnalyzeTask) {
lintVitalAnalyzeTask.dependsOn(fontCopyTask)
}
def generateAssetsTask = tasks.findByName("generate${targetName}Assets")
generateAssetsTask.dependsOn(fontCopyTask)
}
then patch the package. npx patch-package react-native-vector-icons