Main.js not running
iamxyntho opened this issue · 4 comments
iamxyntho commented
Hello,
I was building an app with android-js to just connect the back and front module.. I found some bugs...
- The androidjs build doesn't contain the ipc module I had to add it by myself please add that to the assets.
- After running the app I don't think the main.js file ( Node Runtime File ) is running.... I think it's a problem running the node program? I tested it by removing
app.toast.show
in the normal browser (mac version Chrome), obviously the main.js file hasn't been started so I started it... It works fine but when I build it and install in it my phone it doesn't get any response from the back end ( I set some event listeners to check connection between back and front module, worked fine on my mac but it doesn't run in the phone) .
Any Idea how to resolve 2nd point??
Thanks in advance,
Krishnab Sarkar
DeveshPankaj commented
Hey @codewithkrishnab, make sure you have named the main (node js) file as main.js
- AndroidJS searches for
main.js
file when running on mobile device
bigbenz8 commented
I , think so. I'v get the same problem.
bigbenz8 commented
and, how to debug the code in main.js ? Is there any simple & easy way ?
iamxyntho commented
@DeveshPankaj this issue still exists .
Please look forward to solve this issue as it is a major setback for AndroidJS.
The main feature of AndroidJS that makes it different (from other mobile native JavaScript modules such as React Native, Cordova, etc.) is its Node JS runtime.
Thank You.