Tag: dialogflow

Android Studio 3.0未解决的参考:SupportedLanguages for AIConfiguration类在Dialogflow(api.ai)

我正在通过查询Dialogflow代理程序在Kotlin中构建一个chatbot Android应用程序。 我正在使用Dialogflow Android客户端github存储库自述文件和该存储库中提供的示例应用程序作为构建应用程序的基础。 如上所述, AIConfiguration.SupportedLanguages java代码AIConfiguration.SupportedLanguages工作: import ai.api.android.AIConfiguration; ….. private void initService(final LanguageConfig selectedLanguage) { final AIConfiguration.SupportedLanguages lang = AIConfiguration.SupportedLanguages.fromLanguageTag(selectedLanguage.getLanguageCode()); ….. 你可以在这里find完整的用法。 当我在Kotlin中实现时: import ai.api.android.AIConfiguration …. private fun initService() { //final AIConfiguration.SupportedLanguages lang = AIConfiguration.SupportedLanguages.fromLanguageTag(selectedLanguage.getLanguageCode()); val config = AIConfiguration(CLIENT_ACCESS_TOKEN, AIConfiguration.SupportedLanguages.EnglishGB, AIConfiguration.RecognitionEngine.System) …. 在Android 3.0中,我得到了ALConfiguration.SupportedLanguages的“ Unresolved reference:SupportedLanguages ”的AIConfiguration.SupportedLanguages 。 AIConfiguration.RecognitionEngine解决得很好。 为什么这个问题会发生? 我可以实施哪些解决方案/解决方案? 我的更高级别的build.gradle文件: apply plugin: […]