我正在尝试针对Android应用程序的Google-api-java-client使用this示例,但是在我的Andoid项目中,它没有解析符号 services 和 drive < / strong>。我下载了google-api-java-client的lib文件,并将其复制到apps lib文件夹中。
App build.gradle中包含以下内容
implementation 'com.google.android.gms:play-services-drive:15.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation "com.google.android.gms:play-services-gcm:15.0.1"
implementation 'com.google.android.gms:play-services-identity:15.0.1'
implementation 'com.google.apis:google-api-services-storage:v1-rev134-1.23.0'
并将以下内容添加到项目build.gradle
buildscript {
repositories {
google()
maven {url "https://maven.google.com"}
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'com.google.gms:google-services:3.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
maven {url "https://maven.google.com"}
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
但是仍然出现无法解析符号的错误。