React Native Tutorial: Building Android Apps with JavaScript

Unable to navigate to the PropertyView Screen

Great tutorial. But i can’t get the output of 20 listings in the log file. I’ve compared my code with the final one and i seem not to find my error. My output is still the website of nestoria api. I will appreciate any help.

@seun, is the final project showing the output but yours isn’t? You may also want to check the versions of React Native being used. You should be able to find this info in the package.json file.

@seun same with me, this is mine :
“react”: “16.3.1”,
“react-native”: “0.55.0”
if use the latest which is 16.4.1 and 0.56.0 i got accessbilityinfo error, so base on stockoverflow i must lower my version. but when i lower my version i not get output for property listing “20”
it like the if not working or the code stop at the top of _handleResponse.

i hope i get the answer for this because this tutorial is great, thank you

@cabernathy Can you please help with this when you get a chance? Thank you - much appreciated! :]

@andylah please share your code for SearchPage.js. I walked through the tutorial with the following versions:

"react": "16.4.1",
"react-native": "0.56.0",

There were some warnings, such as using deprecated StackNavigator, but I was able to get the number of property listings to be logged:

08-01 18:18:07.261  5444  8447 I ReactNativeJS: Properties found: 20

Could you also check if you can successfully get results from the final project that’s linked in the tutorial? That may rule out things like internet connection from the emulator or other things.

@cabernathy thank you for your response, i really appreciate it.
You are using the latest version right, as i mention in my previous comment. I cannot using the latest version because it give me AccessbilityInfo error so base on stackoverflow i must lower my version to

“react”: “16.3.1”,
“react-native”: “0.55.0”

i don’t know it effect on this tutorial or not but i was using that version when i cannot see the propertyFound result

And this is my searchPage.js code :

 _executeQuery = (query) => {
    console.log('SearchPage -> _executeQuery : '+query);
    this.setState({ isLoading:true })
    fetch(query)
        .then(response => {
            if (response.ok) {
                return response.json();
            }
            throw new Error('Network response was not ok.');
        })
        .then(json => this._handleResponse(json.response))
        .catch(error =>
            this.setState({
                isLoading: false,
                message: 'Something bad happened ' + error
            }));
};

and this _handleRepsonse code :

_handleResponse = (response) => {
        this.setState({ isLoading: false, message: '' });
        console.log('Response : '+response.application_response_code);
        if (response.application_response_code.substr(0, 1) === '1') {

            console.log('Properties found: ' + response.listings.length);
        }else{
            this.setState({ message: 'Location not recognized; please try again.' });

        }
    };

even if i input wrong location on search box it not give me the error warning, it only show me this code on the screen
console.log('Response : '+response.application_response_code);

once again thank you for this awesome tutorial :grinning:

Could you also check if you can successfully get results from the final project that’s linked in the tutorial? That may rule out things like internet connection from the emulator or other things

@cabernathy thank you,
you think it matter if i am using Android 5.0 Lollipop to running the program, because i use live device and not emulator. after i read yout tutorial from the top i just realize that your tutorial using Android 6.0 Marsmellow.
and for the running final project, i am also cannot running it because it using

“react”: “16.4.1”,
“react-native”: “0.56.0”

that give me this

but thank you for your time, i will try research on what happen and if i am stuck i will back to this discussion, thank you

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!