vbauer / yandex-translate-api

A simple REST client library for Yandex.Translate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

having issues getting it to work with android studio

mrgreaper opened this issue · comments

Getting many calls to add translation to my app and since its generating a ton of text from many many generators i have created, translating them all would mean that ...well i do not have that may years left in me lol google api charges (my app is free so that is a big no no there) i came across yandex and your api but i have never used an api before so not sure if i am doing it right but i only get as far as the setup gradle part
i load up android studio, open my project go to the build.gradle (the first one as there is two)
add
url "https://jitpack.io" to the repository list result = http://pastebin.com/veBtDLNj

now android studio tells me that the gradle files have changed and the project needs to be synced, when i do that i get this error:

Error:(6, 0) Could not find method url() for arguments [https://jitpack.io] on repository container.
Open File

is there a special way to use this in an android project? (i did find it strange i did not need to download anything, was i meant to ? )
any tips would be gratefully recieved

I think you have problem in the Gradle build script ("maven" section is missed):

repositories {
    maven {
        url "https://jitpack.io"
    }
}

dependencies {
    compile 'com.github.vbauer:yandex-translate-api:1.2.4'
}

Also, I'm not sure that yandex-translate-api will work with Android. It is necessary to have Java 8.

Ah, back to the drawing board then :(
So far I can send the string to the Web version of Google translate and
have their result page display in a webview on the app, (the string
ofcourse includes all html coding so the end result looks messy but that's
a minor fix) given that the Google api is not free I am unsure if they
would be happy with my work around though (can not find definitive answer
on that, and as this is a hobby my experience level is not helping lol)
Thought yandex was the answer to my woes. There has to be an opensource or
free to use translation api for free android apps somewhere on the net!
Thank you for the reply it has helped despite being words I didn't want to
hear lol

On 25 Oct 2016 5:42 p.m., "Vladislav Bauer" notifications@github.com
wrote:

  1. I think you have problem in the Gradle build script ("maven" section
    is missed):

repositories {
maven {
url "https://jitpack.io"
}
}

dependencies {
compile 'com.github.vbauer:yandex-translate-api:1.2.4'
}

  1. I'm not sure that yandex-translate-api will work with Android. It is
    necessary to have Java 8.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#3 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACNP2C0jfLJ_fIaVjk7necQb6B4luPXFks5q3jFggaJpZM4KgCKz
.