お世話になります
###前提・実現したいこと
android javaにて、google driveを参照するアプリを作る。
当面は、txtのような文字列だけのファイルを読み書きすることを
考えています。
###発生している問題・エラーメッセージ
Cannot resolve symbol 'services'
###該当のソースコード
https://qiita.com/kubotaku1119/items/9df79c568e100c0c7623
を参考に、コードを組んだところ、
import com.google.api.services.drive.Drive; import com.google.api.services.drive.DriveScopes; import com.google.api.services.drive.Drive.Files; import com.google.api.services.drive.model.File; import com.google.api.services.drive.model.FileList;
のservicesが全て赤文字になり、これらによりインポートされる
クラス名も全て赤文字になってしまいました。
Gradleは、
apply plugin: 'com.android.application' android { compileSdkVersion 26 defaultConfig { applicationId "xxx.xxx.xxx.xxx" minSdkVersion 15 targetSdkVersion 26 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } buildToolsVersion '27.0.2' } configurations { compile.exclude group: 'xpp3', module: 'xpp3' compile.exclude group: 'org.apache.httpcomponents', module: 'httpclient' } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'com.android.support:appcompat-v7:26.1.0' implementation 'com.android.support.constraint:constraint-layout:1.0.2' testImplementation 'junit:junit:4.12' compile 'com.android.billingclient:billing:1.0' compile 'com.google.android.gms:play-services-auth:11.6.0' compile 'com.google.android.gms:play-services-drive:11.6.0' }
としました。
###試したこと
File->invalidate Caches/Restert..->Invalidate and Restert
を選んで、android studioを再起動しましたが、同じ現象が起きています。
###補足情報(言語/FW/ツール等のバージョンなど)
android studio 3.0.1
宜しくお願い致します。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。