Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 29534

Expo Vector Icons Not Displaying

$
0
0

I have a detached Expo project that utilizes @expo/vector-icons, but it is not loading the vector icons on the release build variant.

In debug the vector icons display properly (see picture below), but in release, they do not display at all. I've tried running locally using expo start --no-dev --minify for local "release" testing, but still fail to get any icons on the device.enter image description here

Another issue that I have found is that the onLoad callback for Images is not working. I've had to use the following workaround on Android for images in order to get the images to load properly on Android.

if (Platform.OS === 'ios' ) {    return (<View style={[style, styles.fullBackground]}><Animated.Image                 {...props}                source={thumbnailSource}                style={{ opacity: this.thumbnailAnimated }}                blurRadius={2}                onLoad={this.handleThumbnailLoad}            /><Animated.Image                 {...props}                source={source}                style={[styles.imageOverlay, { opacity: this.imageAnimated }, style]}                onLoad={this.onImageLoad}            /></View>    );} else {    return (<View style={[style, styles.fullBackground]}><Image                 {...props}                source={source}                style={[styles.imageOverlay, { opacity: 1 }, style]}            /></View>    );}

Here is my package.json

{"main": "node_modules/expo/AppEntry.js","scripts": {"start": "expo start","android": "expo start --android","ios": "expo start --ios","eject": "expo eject","postinstall": "jetify"  },"dependencies": {"@react-native-community/datetimepicker": "2.1.0","@react-native-community/slider": "^1.1.3","@unimodules/core": "~5.0.0","@unimodules/react-native-adapter": "~5.0.0","@expo/vector-icons": "^10.0.0","expo-ads-facebook": "~8.0.0","expo-asset": "~8.0.0","expo-facebook": "~8.0.0","expo-google-app-auth": "^6.0.0","expo-linear-gradient": "~8.0.0","expokit": "^36.0.0","geofire": "^5.0.1","geofirex": "0.0.6","geopoint": "^1.0.1","lodash": "^4.17.11","lodash.debounce": "^4.0.8","moment": "^2.24.0","react": "16.9.0","react-native": "https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz","react-native-animatable": "^1.3.2","react-native-animated-linear-gradient": "^1.2.0","react-native-app-intro-slider": "^2.0.1","react-native-elements": "^1.1.0","react-native-gesture-handler": "~1.5.0","react-native-indicators": "^0.13.0","react-native-iphone-x-helper": "^1.2.1","react-native-linear-gradient": "^2.5.4","react-native-map-link": "^2.4.5","react-native-maps": "0.26.1","react-native-mask-loader": "0.0.3","react-native-modal": "^11.0.1","react-native-reanimated": "~1.4.0","react-native-share": "^1.1.3","react-native-super-ellipse-mask": "^1.0.7","react-native-swipeable": "^0.6.0","react-native-text-gradient": "^0.1.5","react-native-unified-contacts": "^2.0.0-pre.2","react-navigation": "^3.11.1","recyclerlistview": "^1.3.4","rxjs": "^6.5.2","expo-font": "~8.0.0","expo": "^36.0.0"  },"devDependencies": {"axios": "^0.19.0","babel-preset-expo": "^5.0.0","expo": "^36.0.0","firebase": "^5.11.1","firebase-admin": "^8.1.0","geofirestore": "^3.3.1","jetifier": "^1.6.5","react-native-clean-project": "^3.2.1","react-native-extra-dimensions-android": "^1.2.5","react-native-firebase": "^5.2.0","react-native-unimodules": "^0.5.4"  },"private": true}

I've tried quite a few different things, such as:

  • Removing node_modules and re-running npm install
  • Upgrading from Expo SDK 35 to Expo SDK 36
  • Re-checking Expo documentation on upgrading SDKs (This project originated as SDK 32)

I'm at a bit of a loss on why this is occurring. Even talked with some people from Expo and they were unsure about why this might be happening (especially the Image onLoad callback). It's worth noting that the iOS build works correctly in development and release.


Viewing all articles
Browse latest Browse all 29534

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>