10

There is no code. I am creating a project but some files are missing.

Using command react-native init helloworld project is created, but index.android.js and index.ios.js aren't generated or missing, only index.js is appearing.

1

4 Answers 4

13

This is due to a recent update.

New projects have a single entry-point (index.js) from now on (6e99e31) - @fson

This shouldn't cause you any trouble during the compilation or run-time.

Sign up to request clarification or add additional context in comments.

4 Comments

and one problem is after installed in my phone. it is showing could not connect to developement server and many thing in red screen . please helpe me.
Dev Settings → Debug server host for device and add my ip address. but still red box is open.
but it is run on my simulator perfectly .please if you have any idea
4

You can try out this:

npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

Comments

0

I faced the same issue. I build a scratch app. After finding solution on many help portals, I finally find file. Its app.js not index.js. In app.js you can find ios and android files.

You can find more info here

And if you want to use these files then downgrade your react version. Yeap, downgraded to 0.44.0 and works now. In cause somebody doesn't know how to downgrade react, you need to install: react-native-git-upgrade

Comments

0

New react native apps are created with a single index file, therefore we officially support single index file.

Ref link:- https://github.com/wix/react-native-navigation/issues/3040

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.