Step by Step guide for setting up ML Kit for Firebase Android.

Sree Kumar A.V
3 min readMay 17, 2018

--

Follow the below step to set up the MlKit for Android, this will help you to run the Google Sample App https://github.com/firebase/quickstart-android/tree/master/mlkit . I had faced couple of issues, while doing the initial set up for MlKit, hope this will help someone.

  1. Add a Project in Firebase console https://console.firebase.google.com
Create Project landing page

2. In the dialog that appears, enter name of the Project and select your preferred Country/region

3. Choose Add Firebase to Android option

4. In the Register App tab, give the package name of the App then Click Register App.

5. Download the config file and place it under your app package.

Double check your google-service.json, if api_key is missing, do add that manually. This was a very wired behaviour and not sure why is like that.

}
],
"api_key": [], -> Missing API key here
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 1,
"other_platform_oauth_client": []
},
"ads_service": {
"status": 2
}
}

Now you might be thinking where you can find the api_key.

Go to firebase console and click on the gear icon->project settings then copy the web api key from there.

then edit the google-service.json to this

"api_key": [{"current_key":"<your key goes in here>"}],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 1,
"other_platform_oauth_client": []
},
"ads_service": {
"status": 2
}
}

5. Enable the cloud vision Api for your project. Visit https://console.developers.google.com/apis/dashboard

click on the Enable APIS AND SERVICES then search for cloud vision.

Click the on the cloud vision API card and enable the API.

6. Enable the billing for your Project

Now you will be able to Run the App.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Sree Kumar A.V
Sree Kumar A.V

Written by Sree Kumar A.V

Lead Android Software Engineer @ YML

Responses (1)

Write a response