我正在学习2018年关于如何在android应用程序上实现对话框流的教程。但是,当我遵循该教程时,我在放置依赖项时遇到了一个问题。
这就是我的build.gradle文件的样子
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.example.specialgift"
minSdkVersion 15
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/INDEX.LIST'
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'ai.api:sdk:2.0.7@aar'
implementation 'ai.api:libai:1.6.12'
implementation 'com.google.cloud:google-cloud-dialogflow:0.67.0-alpha'
implementation 'io.grpc:grpc-okhttp:1.15.1'
}我收到一条错误消息说
无法在单个dex文件中容纳请求的类(#方法: 156179 > 65536)
在寻找其他较新的教程之后,我从对话框中找到了一条消息-- android页面,我得出结论说,android自2019年10月(在创建教程之后)就被废弃了。在对话框流文档页面中,我找不到任何android文档。
SDK是否已被弃用,还是存在另一种解决此错误的解决方案?
发布于 2020-02-08 03:47:37
该错误与弃用无关,它只是意味着您需要在应用程序中使用使能多重索引。
https://stackoverflow.com/questions/60123732
复制相似问题