无法导入Firestore和dialogflow依赖关系(渐变)

时间:2019-04-01 12:09:36

标签: android gradle dependencies google-cloud-firestore dialogflow

我有一个带有firebase的应用程序,用于Google社交登录,导入了firestore的数据库,并为我的聊天机器人提供了dialogflow。

我的gradle依赖项是:

    implementation 'com.google.firebase:firebase-auth:16.2.0'
    implementation 'com.google.firebase:firebase-core:16.0.8'
    implementation 'com.google.android.gms:play-services-auth:16.0.1'

    implementation 'com.google.firebase:firebase-firestore:18.0.0'
    implementation 'com.google.cloud:google-cloud-dialogflow:0.71.0-alpha'

    implementation 'com.android.support:multidex:1.0.3'

和相关的代码是:

    private fun sendQueryToBot(messageToSend: String) {
        val queryInput = QueryInput.newBuilder().setText(TextInput.newBuilder().setText(messageToSend).setLanguageCode("es-ES")).build()
        if (queryInput != null) {
            doAsync {
                try {
                    val detectIntentRequest = DetectIntentRequest.newBuilder()
                            .setSession(session.toString())
                            .setQueryInput(queryInput)
                            .build()

                    callbackV2(sessionsClient.detectIntent(detectIntentRequest))
                } catch (e: Exception) {
                    e.printStackTrace()
                }
            }
        }
    }

问题在于,由于我有很多重复的类并且收到“程序类型已存在”错误,因此无法与dialogflow和firestore依赖项一起编译。

Error: Program type already present: com.google.api.Advice$1

我试图排除一些模块和组,但随后我得到了:

e: Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath: QueryInput, GeneratedMessageV3, QueryInputOrBuilder....

¿我该怎么办?,¿任何人都可以帮助我吗?目前无法在android中导入firestore和dialogflow依赖项吗?

谢谢

0 个答案:

没有答案