GPS 位置情報サービスを使用して Android アプリを開発しています。昨日はコンパイルして実行できましたが、今日 Android Studio を開くとLocationListener
、 Location パッケージのLocationRequest
,LocationServices
がインポートされません (シンボル LocationListener を解決できないと表示されます)。
Control実際、 +を実行しても、パッケージのどのクラスも表示されません。Spaceたとえば、com.google.android.gms.common.api
パッケージのクラスが表示されます。
プロジェクト build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "gps.example.com.myapplicationgps"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:design:23.2.1'
compile 'com.google.android.gms:play-services:8.4.0'
}