1

当我将 Google Translation API 集成到 android 中的 Google Speech API 时应用程序崩溃

摇篮:

implementation "io.grpc:grpc-okhttp:$grpcVersion"
implementation "io.grpc:grpc-protobuf-lite:$grpcVersion"
implementation "io.grpc:grpc-stub:$grpcVersion"
implementation 'javax.annotation:javax.annotation-api:1.2'
protobuf 'com.google.protobuf:protobuf-java:3.3.1'

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

// OAuth2 for Google API
implementation('com.google.auth:google-auth-library-oauth2-http:0.7.0') {
    exclude module: 'httpclient'
}



 implementation ('com.google.cloud:google-cloud-translate:1.53.0'){
     exclude module: 'httpclient'
 }

错误:

引起:java.lang.NoSuchMethodError: No static method decodeBase64(Ljava/lang/String;)[B in class Lorg/apache/commons/codec/binary/Base64; 或其超类(“org.apache.commons.codec.binary.Base64”的声明出现在 /system/framework/org.apache.http.legacy.boot.jar 中)在 com.google.api.client.util。 Base64.decodeBase64(Base64.java:101) 在 com.google.api.client.util.PemReader.readNextSection(PemReader.java:106) 在 com.google.api.client.util.PemReader.readFirstSectionAndClose(PemReader.java: 135) com.google.auth.oauth2.ServiceAccountCredentials.privateKeyFromPkcs8(ServiceAccountCredentials.java:296) com.google.auth.oauth2.ServiceAccountCredentials.fromPkcs8(ServiceAccountCredentials.java:286) com.google.auth.oauth2.ServiceAccountCredentials .

4

0 回答 0