-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
react native 0.72-rc6 android relase error #1508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
also experiencing this issue with my project. rolling back the gradle version seems to have fixed it for now, but that's not a long term solution EDIT: after rolling back the gradle version, the build succeeded but my app is crashing. not sure if the crash is related to the project or not though. |
This comment was marked as outdated.
This comment was marked as outdated.
I have the same problem with EDIT: |
Here is a simpler patch that works for variants on RN 0.72, not sure if it is best the way of fixing it but it may help for the version that will land in the source code. I didn't noticed any issue on icon displayed on android. diff --git a/node_modules/react-native-vector-icons/fonts.gradle b/node_modules/react-native-vector-icons/fonts.gradle
index 5485fac..ef3ccb3 100644
--- a/node_modules/react-native-vector-icons/fonts.gradle
+++ b/node_modules/react-native-vector-icons/fonts.gradle
@@ -26,6 +26,10 @@ 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)
} |
@benoitvallon's patch solved the problem for me, I have multiple app variants and @hengkx didn't work for me because of that. But with this one #1508 (comment) I was able to build the APK and didn't notice any problem with the icons when running on the device. Waiting for a definitive fix to arrive |
did anyone find solution as I run ./gradlew build everytime I get this error A problem was found with the configuration of task ':app:lintVitalAnalyzeRelease' (type 'AndroidLintAnalysisTask').
|
@abhijain1705 have you tried the patches above? They seem to work |
not yet, I am confused where do I need to add these lines |
@abhijain1705 You should look up https://www.npmjs.com/package/patch-package or Yarn's own patching mechanism (https://yarnpkg.com/cli/patch) if you're using it instead of NPM. I don't know exactly in which version of Yarn that was introduced but I'm using Yarn v3.x and it works. You should go through the docs of either of them and get to the step where you edit the external package's source files. Then you'd go to the + def lintVitalAnalyzeTask = tasks.findByName("lintVitalAnalyze${targetName}")
+ if (lintVitalAnalyzeTask) {
+ lintVitalAnalyzeTask.dependsOn(fontCopyTask)
+ } After completing the process following either the |
let me try |
my ./gradlew build failed with these errors
FAILURE: Build failed with an exception.
BUILD FAILED in 12m 16s would you help me on this |
Same issue. react native 0.72 |
I have been getting this when building using fastlane to make a release build. Initially I was getting this error for the task Afterwards I got the same error posted by OP, so in the end the patch that worked for me was declaring an explicit dependency for both the
|
The patch from #1508 (comment) works perfectly. Thanks @benoitvallon |
The patch work for me, thanks!! |
I also got this error and hotfixed it, but diff --git a/node_modules/react-native-vector-icons/fonts.gradle b/node_modules/react-native-vector-icons/fonts.gradle
index 5485fac..7b8c6ca 100644
--- a/node_modules/react-native-vector-icons/fonts.gradle
+++ b/node_modules/react-native-vector-icons/fonts.gradle
@@ -26,6 +26,18 @@ afterEvaluate {
android.applicationVariants.all { def variant ->
def targetName = variant.name.capitalize()
+ def lintVitalReportTask = tasks.findByName("lintVitalReport${targetName}")
+ if(lintVitalReportTask) {
+ lintVitalReportTask.dependsOn(fontCopyTask)
+ }
+ def lintVitalAnalyzeTask = tasks.findByName("lintVitalAnalyze${targetName}")
+ if(lintVitalAnalyzeTask) {
+ lintVitalAnalyzeTask.dependsOn(fontCopyTask)
+ }
+ def lintAnalyzeTask = tasks.findByName("lintAnalyze${targetName}")
+ if(lintAnalyzeTask) {
+ lintAnalyzeTask.dependsOn(fontCopyTask)
+ }
def generateAssetsTask = tasks.findByName("generate${targetName}Assets")
generateAssetsTask.dependsOn(fontCopyTask)
} |
#1508 (comment) It does works on my project with RN 0.72.1 and yarn 1.22.19 |
Its not a right method to update node_modules and also its not working for me. @benoitvallon I am using React native v0.72 from gradle v8.2 -> v7.6.2 change distributionUrl in android/gradle/wrapper/gradle-wraper.properties
|
|
working fine after added this inside vector-icons node_modules |
Solved the problem for me. |
Fixed in 10.0.0 |
1. Look, find fonts.gradle file from nodemodules> react-native-vector-icons >fonts.gradle: you will find an object in fonts.gradle i.e: 'afterEvaluate' like this: afterEvaluate {
2. Now need to add these lines of code init: android.applicationVariants.all { def variant -> 3. This will turn out like this: afterEvaluate {
} 4.Then create a build again. I hope this will help :) |
I have the same problem with react-native: 0.72.0 But after many searching and analysing i find out solution:- Just remove this line from android/app/build.gradle
|
@Hit-Opash This is not recommended as it makes upgrading harder. Is the fix in 10.0.0 not working for you? |
This is work for me because I added assets -> fonts -> .ttf file. folder using npx react-native-asset . |
And write not |
I had a similar problem in version 10.0.0
So I add a similar fix to #1508 (comment) by adding the following lines to node_modules/react-native-vector-icons/fonts.gradle
|
Same problem in 10.0.0 im afraid. Running on react-native 0.72.3. |
new version work well. |
I ran into the same issue today with ./gradlew build failing. The patch suggested by @VincentSastra worked for me, i.e. adding
|
distributionUrl=https://services.gradle.org/distributions/gradle-7.5.1-all.zip works with Gradle version 7.5.1 on RN 072.4 and react-native-vector-icons 10.0.0 update just install the latest version. |
i think just install latest version of react-native-vector-icons , it works for me. |
i was getting same error. |
I'm using RN 0.73 and when i updated to 10.0.0 works fine. |
@ManeeshNadcab @tuiza
|
This works |
@krmahil Welcome |
There is a PR that will solve this here. |
Works Perfectly for me. Thanks! |
@ergen35 Welcome, Happy to help |
Add this end of android/app/build.gradle fixed the issue for me. |
Environment
Description
Describe your issue in detail. Include screenshots if needed.
Reproducible Demo
Let us know how to reproduce the issue. Include a code sample, share a project, or share an app that reproduces the issue using https://snack.expo.io/. Please follow the guidelines for providing a MCVE: https://stackoverflow.com/help/mcve
FAILURE: Build failed with an exception.
What went wrong:
A problem was found with the configuration of task ':app:lintVitalAnalyzeRelease' (type 'AndroidLintAnalysisTask').
Gradle detected a problem with the following location: '/Users/tom/Documents/GitHub/media/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.
Try:
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/8.0.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 1m 33s
facebook/react-native#37815
The text was updated successfully, but these errors were encountered: