java - 无法解析符号“服务”导入 com.google.api.services;
问题描述
我正在尝试为 google-api-java-client for android app遵循此示例,但在我的 Android 项目中,它没有解析符号services和drive。我下载了google-api-java-client的 lib 文件并将其复制到应用程序 lib 文件夹中。
包括以下应用程序 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
}
但我仍然收到无法解析符号的错误。
解决方案
推荐阅读
- android - 找一个类似于网络音频API的android库
- javascript - 在 reactjs 中相对于其父级定位组件
- html - 图标真棒在同一行
- python - 网页抓取文本条
- ios - 单击按钮时将数据存储在 NSMutable 数组中
- javascript - 存储在 asp.net core 2.0 中的会话变量第一次给出 null 并且在刷新时工作正常
- android - 如何将原始 H.264 帧流式传输到 Windows 10 UWP?
- vba - VBA - 仅在 ActiveSheet 上的命令按钮计数
- php - SonataUserBundle + FOSUserBundle 注解问题学说主键错误
- python - 使用 OSMNx 绘制多条路线