I have asked this question on Stack Overflow but received no response, any help here would be great! Here’s my problem:
I am trying to build and run my Meteor app on Android. If I simply run
meteor run android-device
or
meteor run android-device --mobile-server http://<host>
It loads up on my device (LG-E988, Android version 4.4.2).
However, when I build the app into a .apk
and run it on my device, it would not start. Here’re my steps:
I have already added the platforms, added mobile-config.js
etc. Here are my last steps:
-
Navigate into my project’s directory and run:
$ meteor build ~/Desktop/project-build/ --server=http://<host>:<port> --verbose
I get a success message.
BUILD SUCCESSFUL Total time: 2 mins 37.466 secs Built the following apk(s): Android
-
Navigate to
~/Desktop/project-build/android/
and I find aproject/
directory, aREADME
and arelease-unsigned.apk
.I then signed the
release-unsigned.apk
:$ jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore /home/dayuloli/.keystore release-unsigned.apk <alias>
Then I verified that it has been signed:
$ jarsigner -verify -verbose -certs release-unsigned.apk
And the console printed
jar verified.
. -
Next I
zipalign
$ $ANDROID_HOME/build-tools/23.0.2/zipalign 4 release-unsigned.apk production.apk
-
Sends the
production.apk
to my Android device. When I ran the app, I get an Application Error with the following message:net::ERR_FILE_NOT_FOUND (file:///android_asset/www/index.html)
Observations
-
The app icon shows the cordova logo instead of the logo icons I specified in the
mobile-config.js
-
When I unpacked the
production.apk
, I don’t see aandroid_asset
directory. But I do see aassets/www/
directory, but this has noindex.html
in it.
How can I resolve this issue?