J. Hock
J. Hock

Reputation: 125

Import Google Translation API to Android Studio

I´ve registered for Google Cloud Services and activated the Google Cloud Translation API. Now I want to start an Android Studio Project, using this API. In the documentation they refer to Import the following librarys:

import com.google.cloud.translate.Translate;
import com.google.cloud.translate.Translate.TranslateOption;
import com.google.cloud.translate.TranslateOptions;
import com.google.cloud.translate.Translation;

How to get these librarys for Java/Android Studio?

https://cloud.google.com/translate/docs/reference/libraries

On this page under 'Installing the client library' one can not find something for Java.

So how to use this API in Android Studio?

Upvotes: 2

Views: 3117

Answers (1)

J. Hock
J. Hock

Reputation: 125

putting

dependencies {
...
compile 'com.google.cloud:google-cloud-translate:1.12.0'
} 

into my build.gradle solved the problem.

Upvotes: 1

Related Questions