Skip to content
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

Icons are not resolved on Android when the app is one of the packages in a monorepo #1281

Closed
2 tasks done
varungupta85 opened this issue Nov 27, 2020 · 2 comments
Closed
2 tasks done

Comments

@varungupta85
Copy link

varungupta85 commented Nov 27, 2020

Environment

Android

Description

I am moving my app to a monorepo to enable code sharing in multiple apps. After the refactoring, the icons are no longer resolved on Android. The icons are resolved correctly on iOS. I have updated the android/app/build.gradle to point to the right gradle file for the fonts as below

apply from: "../../../../node_modules/react-native-vector-icons/fonts.gradle"

I think the issue is that it is not able to find the fonts file and require some tweaking with some configuration to point to the right font files for Android.

@varungupta85
Copy link
Author

Need to update the location in the fonts.gradle file as well to point to the right .ttf files.

@samzmann
Copy link
Contributor

Ran into this issue today, on RNVI 8.0.0.

I solved it by upgrading to RNVI 9.2.0 and changing my android/app/build.gradle like so:

project.ext.vectoricons = [
+   iconFontsDir: "../../../../node_modules/react-native-vector-icons/Fonts",
    iconFontNames: ['Feather.ttf', 'FontAwesome.ttf'] // Name of the font files you want to copy
]

- apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
+ apply from: "../../../../node_modules/react-native-vector-icons/fonts.gradle"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants