How to make Android App run using meteor v1.5.x or later

[Mobile version(QRCode)] Total views:69,200 / Applauds for blog:1
Welcome to my page. I am an adminisrator of this site.
If you are this db's user, please contact with me by private mail. If not, please contact with me by email or twitter or facebook
Access record[Graph / PV Info.(Past 1 day / Past 1 week) / Access from outside (Yesterday / Past 1 week) / Vistors's list]
ProfilePmail(Mail)
Inbox   /Send   /Sent
Reviews(List   /Limit)
Poll   /Agree:Got   /Sent
Fan
Works/Music
Blog
[Write]
Links
My Play List
<=Newer article How to install mongodb
=>Older article How to use ES6

1.
2017/07/27 (Updated 2018/02/05) "Meteor > How to make Android App run using meteor v1.5.x or later"
[Show only this article / Modify / Delete / Send trackback / Add to the shared category]

1. Background
2. Assumed procedure of making Making Meteor app run on Android
    1. Assumed environment
    2. Install Java
    3. Install Android Studio
    4. Put workable Android SDK at the proper path
        1. Download workable SDK and put at the proper location ._
        2. Set environment value
    5. Create virtual device using Android SDK
    6. Try to make Android app run
3. Encountered Error
    1. Something is missing
    2. Error related with gradle
    3. PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value and Emulator is not invoked
    4. Error: adb: Command failed with exit code 1 Error output: error: device unauthorized
    5. ...E chromium: ERROR:...
    6. Cannot deploy meteor app though you succeeded first time
    7. Meteor App does't talk with remote server
4. How to release to Google play

1. Background

Meteor is ideal when I create Android/iOS/Web application just by 1 code.

But Android version doesn't work with Latest Android SDK now, so we have to do do many tricks to make it run now.

I encountered many problems to try to make Meteor app run for Android.
I encountered different problems when I tried to make Meteor app run on Android after a while.

It may depend on env but you have to solve the problems one by one and you can succeed in launching Android App at the end.
I will share what I encountered and how I solved them.
2. Assumed procedure of making Making Meteor app run on Android


    1. Assumed environment

Latest Mac OS.
    2. Install Java

brew cask install java8;

But there is the possibility that the latest Java cannot make the environment workable.
In the case of February, Java9 has the problem, so I had to specify version (java8).
If you have installed java9 or higher on your machine, brew cask remove java; and java cask install java8;

You can verify java's version by
java -version;
    3. Install Android Studio

https://developer.android.com/studio/index.html
    4. Put workable Android SDK at the proper path

Reading https://guide.meteor.com/mobile.html for Android section, do what is described
Basically you have to
1) Open Android Stuido
2) Configure
3) Choose
[SDK Platforms]
- Android SDK Platform
- Google Play Intel x86 Atom System Image
Show details show them

[SDK Tools]
- Android Emulator
- Android SDK Build Tools
- Android SDK Platform Tools
- Android SDK Tools
- Intel x86 Emulator Accelator
      1. Download workable SDK and put at the proper location ._

Download files based on the description like this.
Meteor 1.4.3.1 or later: Android SDK Tools v.25.2.x (mac, linux, windows) or v.26.0.0 or later

Unzip it and remove $ANDROID_HOME/tools and put downloaded tools directory there.
      2. Set environment value

vi ~/.bash_profile
export ANDROID_HOME=~/Library/Android/sdk;
export ANDROID_SDK_ROOT=$ANDROID_HOME
export PATH=$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools:$PATH

Reflect change to env
. ~/.bash_profile;
echo $ANDROID_HOME;

Of course, you have to verify the existence of the directory's content
ls -lFt $ANDROID_HOME;

    5. Create virtual device using Android SDK

Start any project and click the device mark and create 1 Android Virtual Device

After you finish it, you should be able to see some result by typing
avdmanager list targets
    6. Try to make Android app run

ex.
meteor run --settings $site-settings.json --mobile-server=https://www.travelplan.world/ android --verbose;

Adding --verbose is the key to debug the reason of why it is not working.

If it runs without error, it is O.K.
But if not, you have to solve the problem 1 by 1.
3. Encountered Error


    1. Something is missing

Invoke Android studio and install package which is said as missing.
    2. Error related with gradle

Check you whether you did "Download workable SDK and put at the proper location ._ " and "Set environment value"
    3. PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value and Emulator is not invoked


In the case that Emulator is Nexus_5X_API_23

grep image.sysdir.1 ~/.android/avd/Nexus_5X_API_23.avd/config.ini

And
image.sysdir.1=system-images/android-25/google_apis/x86/

was shown but
ls -lFt ~/Library/Android/sdk/system-images/android-25/google_apis/x86/
didn't exist and
ls -lFt ~/Library/Android/sdk/system-images/android-25/google_apis_playstore/x86/
was existing one, so I modified the line into
image.sysdir.1=system-images/android-25/google_apis_playstore/x86/

If system-images/android-$VERSION/google_apis_playstore/x86/ doesn't exist, install Google Play Image from Configure screen of Android Studio.
    4. Error: adb: Command failed with exit code 1 Error output: error: device unauthorized

Make emulator run first through Android studio or command anyway.
After it type meteor run command.
    5. ...E chromium: ERROR:...

Remove crosswalk package
meteor remove crosswalk;

    6. Cannot deploy meteor app though you succeeded first time

Remove Android Virtual Device and recreate it using Android studio
    7. Meteor App does't talk with remote server

Check the url which you type is accessible without redirection or any error.

ex.
meteor run --settings $site-settings.json --mobile-server=https://www.travelplan.world/ android;
4. How to release to Google play

See the procedure
https://support.google.com/googleplay/android-developer/answer/6334282?hl=en

Add comment to this article


[Read other articles]
<=Newer article How to install mongodb
=>Older article How to use ES6


Articles categorized as "Meteor by this user"
All articles of this user
Subscribe to RSS
RSS
Term
Category
All
1.Japan
2.Atlassian's products
3.Self
4.Development of this site
5.Japanese comics
6.Japanese anime
7.Weekly hot news of Japanese culture
8.OP/ED/PV
9.Japanese game
10.Ranking
11.Japanese Comics (Manga)
12.Search Engine
13.Japanese drama
14.Japanese otaku culture
15.Programming
16.Ineternet world
17.Movie
18.C/C++
19.BerkeleyDB
20.Apache programming
21.Spam
22.Meteor
23.Marketing
24.Python
25.Scrum
26.JIRA
27.Git
28.CI
29.Jenkins
30.AWS
31.Operation
32.Singapore
33.Cloud
34.Mysql Cluster
35.DevOps
36.Bitbucket
37.Xamarin
38.Good and new
39.Monitoring
40.JavaScript(node.js)
41.React
42.Phillipines
43.Hiring
44.Python
45.SEO
46.Malaysia
47.Mongodb
48.Perl
49.Docker
50.Life hack
51.Dance
52.QA
53.Mysql
54.Digital Life Hack
55.Project management
56.Django
57.Gatsby
58.Administrator
Sayings from S-Cry-Ed

Rule in this world is speed. Even stupid person can write cool novel if he can spend 20 years for it.

If someone helped me, I will help him in return, which is my rule.

To become stronger, consider what is cowardliest thinking. And rebel against the thinking, which will make you stronger.



I am Japanese but working for some English sites.

Doctor Job Career
Nurse Job Career
↑Top