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

image can't show when integrate with existing apps in android #13197

Closed
woshi82 opened this issue Mar 29, 2017 · 1 comment
Closed

image can't show when integrate with existing apps in android #13197

woshi82 opened this issue Mar 29, 2017 · 1 comment
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@woshi82
Copy link

woshi82 commented Mar 29, 2017

Description

When i integrate with existing apps in android , the image cannot show,instead errors.
The android project is just a simplest project generated by Android studio through the start a new Android studio project option.
i just follow the steps in document. http://facebook.github.io/react-native/docs/integration-with-existing-apps.html

Reproduction Steps and Sample Code

  1. follow the steps in document.

  2. run command below in my terminal
    npm start
    ./gradlew installDebug

    it shows:
    image

  3. try the method provided in Error on load image on React-native: Unexpected character #6691 ,but nothing worked.
    method 1:
    watchman watch-del-all then restart my packager with the --resetCache option
    method 2:
    restart my editor、genymotion many times

  4. so i delete the code in NavigationHeaderBackButton.js

    <Image style={[styles.button, props.imageStyle]} source={require('./assets/back-icon.png')} />

​ the app start successfully.

  1. added some image in index.android.js. (certainly, have added avatar.png in my project folder).

    <Image width={200} height={200} source={require('./avatar.png')} />

    or

    <Image width={200} height={200} source={{uri: 'https://c4.biketo.com/racegood-com/position_data/58cf482230405.jpg'}} />

the image still can't show.
image

Solution

i just searched in stackoverflow
http://stackoverflow.com/questions/42120879/react-native-integration-with-existing-apps-and-images
but didn't find the solution.

i don't know whether there are some bugs in react native ? or somthing goes wrong in my project?

Additional Information

  • React version: 15.4.2
  • React Native version: 0.42.3
  • Platform: [FILL THIS OUT: Android]
  • Development Operating System: [MacOS]
  • Dev tools: targetSdkVersion 23
@woshi82 woshi82 changed the title image cannot show when integration with existing apps in android image can't show when integrate with existing apps in android Mar 29, 2017
@woshi82 woshi82 closed this as completed Mar 29, 2017
@kekobin
Copy link

kekobin commented Jan 9, 2018

Hello, I have a similar issue in real device of android, so had you deal with it ?

@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants