Error adding Google Identity Toolkit with Gradle

百般思念 提交于 2020-01-06 19:51:21

问题


I am trying to add the Google Identity Toolkit to my Google App Engine backend in Android Studio using Gradle. But I'm new to Android Studio and Gradle.

I have added the following to my backend build.gradle:

repositories {
    mavenCentral()
}

dependencies {
    compile 'com.google.apis:google-api-services-identitytoolkit:v3-rev191-1.20.0'
}

After a sync and gradle build I try to added an import:

import com.google.identitytoolkit.GitkitClient;

But I am getting the following errors:

cannot resolve symbol 'identitytoolkit'

and

error: package com.google.identitytoolkit does not exists


回答1:


Well I feel a little bit stupid... I've realised my mistake:

I should have been using the Gradle config:

compile 'com.google.identitytoolkit:gitkitclient:1.2.3'

instead of

repositories {
    mavenCentral()
}

dependencies {
    compile 'com.google.apis:google-api-services-identitytoolkit:v3-rev191-1.20.0'
}

using

http://search.maven.org/#artifactdetails%7Ccom.google.identitytoolkit%7Cgitkitclient%7C1.2.3%7Cjar

instead of

https://developers.google.com/api-client-library/java/apis/identitytoolkit/v3



来源:https://stackoverflow.com/questions/31839073/error-adding-google-identity-toolkit-with-gradle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!