react-native-vector-icons
react-native-vector-icons copied to clipboard
icon not showing on device
Hello , i using this package to display some icon.
It work fine on ios and android emulator but when i try on a real device with npm run android, i don't see any icon.
How does that work ? it this normal ?
thanks alll
Hi, some more information would be great. Have you followed the installation instructions with Gradle? I'd also suggest uninstalling the app from your device before running it again (sometimes large changes seem to need this).
Hi , thanks for the reply , i did create the apk and install it on my mobile it work fine, icon is here and everything.
I thinks is was a issue with my cable when i did do "npm run android", it didn't transfer everything
Thanks you for your reply
use implementation project(':react-native-vector-icons') instead if compile project(':react-native-vector-icons') i
Same issue:
before install yarn add @react-native-firebase/database, all icons work fine
project.ext.vectoricons = [ iconFontNames: [ 'MaterialIcons.ttf', 'FontAwesomeIcons.ttf' ] ]
after install yarn add @react-native-firebase/database, all icons not showed
project.ext.vectoricons = [ iconFontNames: [ 'MaterialIcons.ttf', 'FontAwesomeIcons.ttf' ] ]
I removed Icons from FontAwesomeIcons.ttf
project.ext.vectoricons = [ iconFontNames: [ 'MaterialIcons.ttf', 'FontAwesome.ttf' ] ]
and with this import Icon from 'react-native-vector-icons/FontAwesome';
, Google icon work fine
<View style={styles.view}>
<View>
<Icon.Button
name="google"
size={30}
style={styles.button}
onPress={signIn}>
<Text style={styles.text}>Login con google</Text>
</Icon.Button>
</View>
</View>
But react-native-paper
don't show the icons
These are some errors...
error Failed to install the app. Make sure you have an Android emulator running or a device connected. Run CLI with --verbose flag for more details. Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 Note: /Users/suriel/Documents/projects/react-native/CalculatorRecipes/android/app/src/debug/java/com/calculatorrecipes/ReactNativeFlipper.java uses or overrides a deprecated API.
error Failed to install the app. Make sure you have an Android emulator running or a device connected. Run CLI with --verbose flag for more details. Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
`> Task :app:compileDebugJavaWithJavac FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.`
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details. Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 Note: /Users/suriel/Documents/projects/react-native/CalculatorRecipes/node_modules/@react-native-community/google-signin/android/src/main/java/co/apptailor/googlesignin/RNGoogleSigninModule.java uses unchecked or unsafe operation
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details. Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 Note: /Users/suriel/Documents/projects/react-native/CalculatorRecipes/node_modules/@react-native-firebase/app/android/src/reactnative/java/io/invertase/firebase/utils/ReactNativeFirebaseUtilsModule.java uses or overrides a deprecated API.
Had the same issue after upgrading and I was able to 'fix' the issue by manually copying the fonts over to the android/app/src/main/assets/fonts
folder.
I haven't dug into it, but I suspect the fonts.gradle
is not working as expected.