How to setup Android Studio for Meteor
From past 6 months I have been developing web applications using Meteor JS. Last month I had to develop a hybrid app and I decided to choose Meteor JS for the cross platform development.
Meteor Js: Meteor Js is an open source web framework built using Node.Js which produces cross platforms apps (Desktop, Web, Android, IOS). Meteor JS integrates with object oriented data base Mongo DB. It uses web sockets to automatically synchronize data with the front end, so the developer does not need to write any code for data synchronization which is the coolest thing about this framework.
So firstly I wanted to have the Android APK file of the App which started the real struggle. After following all the steps from the Internet I always got the error Environment variable ANDROID_HOME is not set or if it is set then yes there was gradle not found error.
After some time I figured out a way to run Android Studio with Meteor JS and I decided to help many others like me who have never used Android Studio and are struggling to make it work with Meteor JS.
In this article I’ll try to explain each and every step in detail to make Android Studio in Ubuntu 14.04 work with Meteor JS.
Step 1: Installing the Java Development Kit (JDK)
As per the documentation form meteor the first step is installing the Java Development Kit (JDK). Note the version should be greater than 1.8.0.
You can follow this link to install the JDK in Ubuntu:
You can also follow the tutorial from Oracle docs:
Step 2: Installing the Android Studio:
To install android studio follow this link
After downloading and installing Android Studio open the the studio by running command ./studio.sh in bin folder in the location you have installed the studio.
In my installed location is /usr/local/android-studio
Now click on the configure button and choose SDK manager. As show in Fig 1:
This will open up a new screen.
Step3: Uninstall current version of Android SDK Platform Tools
Go to SDK tools and uninstall the already installed version of Android SDK platform tools by unchecking the check box i.e. current version was 26.0.3 at the time of writing this article.
Click apply and then OK. Wait for the changes to be done. As shown in Fig 2.
Step 4: Installing Android SDK platform tools version 25.2.5
Now we need to add the old version of SDK platform tools i.e. 25.2.5 as meteor does not support this new version of Android SDK platform tools.
You can download Android SDK platform tools 25.2.5 from this link
Step 5: Copy the extracted file to Sdk folder
After downloading extract the files and you will have the folder build-tools, copy this folder in the SDK folder. In my case the location is
Step 6: Setting up environment variables
Now open up the .bashrc file under /home/username and paste the following lines to setup ANDROID_HOME variables
Now, you are good to start developing Android applications using Meteor JS
Go to you project directory from terminal and add Android platform by running the command
- meteor add-platform android
and to run app in android studio run command
- meteor run android