Closed tri-bao closed 2 weeks ago
@tri-bao To fix this ,follow these step 1) remove apply from: file("../../node_modules/react-native-vector-icons/fonts.gradle") from android/app/build.gradlew 2) go to node_modules/react-native-vector-icon/Fonts and copy all the fonts 3) go to android/app/src/main and create a folder named assets if not exist then inside then assets create one more folder named fonts and paste all the fonts from node_modules/react-native-vector-icon/Fonts to here 4) now you can use the vector icon as usual and also you can create a build which won't failed
thanks @Vimal1464 while that works I had used patch-package
to add the required task dependency into react-native-vector-icons/fonts.gradle
Welcome @tri-bao. Can we follow each other ? as I am new to GitHub looking for some friends ...
Welcome @tri-bao. Can we follow each other ? as I am new to GitHub looking for some friends ...
sure, followed
@tri-bao followed too. ❤️ are you on discord ?? mine is vimal1464
In my case i just add
apply from:("../../node_modules/react-native-vector-icons/fonts.gradle");
in android\app\build.gradle
then problem fixed for me
In my case I added
-keep class com.facebook.react.fabric.** { *; }
in /android/app/proguard-rules.pro
and its started working
For my case, I've added the related dependency to build.gradle
. For your code, it probably would be like:
tasks.configureEach {
if (name == 'generateReleaseLintVitalReportModel') {
dependsOn('copyReactNativeVectorIconFonts')
}
}
I hope it helps 🙏. P.S: After implementing this method, the package seemed not to be working. I had to reset the cache.
I had this same error, but on the lintAnalyze${targetName}
task. I used @Jouskar workaround thanks muchly!
https://github.com/oblador/react-native-vector-icons/issues/1604 "I'm currently working on a React Native project (version 0.73.2) and encountering an issue with react-native-vector-icons integration. Despite following the installation steps (npm install --save react-native-vector-icons followed by pod install), the RNVectorIcons library does not seem to be added to my Podfile.lock or properly linked in my Xcode project. Auto-linking should work with my React Native version, but it appears to be missing. Is there a known issue or step I'm overlooking for React Native 0.73.2?"
Here is the patch patch for anyone that needs it
diff --git a/node_modules/react-native-vector-icons/fonts.gradle b/node_modules/react-native-vector-icons/fonts.gradle
index 951394b..ad15ebd 100644
--- a/node_modules/react-native-vector-icons/fonts.gradle
+++ b/node_modules/react-native-vector-icons/fonts.gradle
@@ -32,6 +32,11 @@ afterEvaluate {
lintVitalAnalyzeTask.dependsOn(fontCopyTask)
}
+ def generateReportTask = tasks.findByName("generate${targetName}LintVitalReportModel")
+ if (generateReportTask) {
+ generateReportTask.dependsOn(fontCopyTask)
+ }
+
def generateAssetsTask = tasks.findByName("generate${targetName}Assets")
generateAssetsTask.dependsOn(fontCopyTask)
}
For my case, I've added the related dependency to
build.gradle
. For your code, it probably would be like:tasks.configureEach { if (name == 'generateReleaseLintVitalReportModel') { dependsOn('copyReactNativeVectorIconFonts') } }
I hope it helps 🙏. P.S: After implementing this method, the package seemed not to be working. I had to reset the cache.
Thank you worked!
generateReleaseLintVitalReportModel
path ?
This should have been fixed in the May 1 release
RN 0.73 upgraded using https://react-native-community.github.io/upgrade-helper/?from=0.72.4&to=0.73.1 AGP: 8.2.0 Gradle 8.3 react-native-vector-icons 10.0.3
The issue is similar to #1508 but this time the error is with other task
generateReleaseLintVitalReportModel
:Adding the following to
fonts.gradle
fixes itCould you please release a new release with that?