MediaView from FacebookAds not working on Android

#1

Hi,

I’m successfully using FacebookAds on ios and am working on releasing for Android. Using SDK 29.

On Android, MediaView appears to be blank, and throws warnings about Possible Unhandled Promise Rejection (id:x) Error: trying to resolve view with tag xxx which doesn’t exist (seen in image)

It also will not let me tap on TouchableView, so something is not working with MediaView.

This is the code:

<View style={{ backgroundColor: '#FCF5F4', borderBottomColor: '#ddd', borderBottomWidth: 1, marginTop: 5 }}>
          <View style={{ flexDirection: 'row', padding: 10, borderColor: '#ddd', borderWidth: 1 }}>
            <Left>
              <Text style={{ fontSize: 12 }}>{this.props.nativeAd.promotedTranslation}</Text>
            </Left>
            <Right>
              <TouchableHighlight onPress={this.openAdChoices}>
                <Image source={require('../../assets/adchoices.png')} style={{ width: 16 }} resizeMode={'contain'} />
              </TouchableHighlight>
            </Right>
          </View>
          <Text style={{ padding: 10, fontWeight: '600' }}>{this.props.nativeAd.advertiserName} - {this.props.nativeAd.headline}</Text>
          <View style={{ flex: 1, width: this.state.width, height: this.state.height }}>
              <MediaView style={{ flex: 1 }} />
          </View>
          <Text style={{ padding: 10 }}>{this.props.nativeAd.bodyText}</Text>
          <Button success rounded small style={{ backgroundColor: '#70C1B3', margin: 10, alignSelf: 'flex-end' }}>
            <TriggerableView>
              <Text>{this.props.nativeAd.callToActionText}</Text>
            </TriggerableView>
          </Button>
        </View>

The other ad related code is used in a separate component, and it works in ios.

closed #2

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.