程序类型已存在:com.google.gdata.client.Query$CategoryFilter



我一直在实现GOOGLE CONTACT API v3(下面是链接((https://developers.google.com/contacts/v3/)

我遵循了文档,并将所有支持的必需库添加到我的应用程序中,所有依赖项错误都已从我的代码中消失

但当我尝试运行/构建时,它显示了这个错误

程序类型已存在:com.google.gdata.client.Query$CategoryFilter消息{kind=ERROR,text=程序类型已存在:com.google.gdata.client.Query$CategoryFilter,sources=[未知源文件],工具名称=可选。of(D8(}

我尝试过谷歌搜索,但没有找到确切的错误解决方案,但我注意到,针对这种问题的大多数修复方法是升级/降级构建版本

所以,我是在api 28上构建的,所以我降级到27.1.1,但出现了相同的错误

这就是我的建筑.gradle的样子

apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.murtaza.contactsync"
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation files('libs/gdata-core-1.0.jar')
implementation files('libs/gdata-client-1.0.jar')
implementation files('libs/gdata-contacts-3.0.jar')
implementation files('libs/guava-11.0.2.jar')
}

这些都是进口

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.google.gdata.client.*;
import com.google.gdata.client.contacts.*;
import com.google.gdata.data.*;
import com.google.gdata.data.contacts.*;
import com.google.gdata.data.extensions.*;
import com.google.gdata.util.*;
import java.io.IOException;
import java.net.URL;

请指导我在哪里以及我做错了什么,或者如何解决这个问题,以便我可以实现谷歌联系人api v3

我已经为这个使用了确切的文档代码

请在这里帮我

Google Contact API折旧,因此我使用Pople来代替浪费时间API可替换为Contact API,其工作方式就像一个迷人的

Google People API链接:https://developers.google.com/people

人员教程API链接:https://blog.iamsuleiman.com/people-api-android-tutorial-1/

示例代码Github链接:https://github.com/simformsolutions/Google-People-API-Sample

最新更新