Androidでの再生サービスを使用して定期的なユーザーの場所をリクエストしています。そのために、私はそれはかなりうまく動作する物理デバイスでは、私のapp/build.gradle
Androidスタジオエミュレータで実行されていないGoogle Playサービス11.0.0への依存アプリ
compile "com.google.android.gms:play-services-location:11.0.0"
に次の依存関係を追加しました。ただし、エミュレータでは動作しませんし、再生サービスの更新を促します。
は、私は、次の質問
How to update Google Play Services for Android Studio 2.2 emulators?
How to update Google Play Services on the emulator in Android Studio
https://android.stackexchange.com/questions/176578/how-to-use-google-maps-android-api-by-google-play-services-11-on-an-emulator-wit(それがオフトピックとしてマークされていたが、ここで同じ問題がある
に応じたさまざまなソリューションを試してみました記載)私は新しいエミュレータにGoogle APIを搭載したx86_64イメージがありますが、それでも問題は解決しません。
私はまた、Androidのスタジオ(私はバージョン2.3.3を持っている)上の最新情報をチェックしているが、それはIDEが最新のものであると言います。
エミュレータでGoogle PlayサービスV11.0.0以上を実行するにはどうすればよいですか?この問題を持つすべてのヘルプは
EDIT理解されるであろう。
ここをGoogleが全体のGoogle Playストアを特色エミュレータイメージをリリースし、私のapp/build.gradle
ファイル
buildscript {
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
// These docs use an open ended version so that our plugin
// can be updated quickly in response to Android tooling updates
// We recommend changing it to the latest version from our changelog:
// https://docs.fabric.io/android/changelog.html#fabric-gradle-plugin
classpath 'io.fabric.tools:gradle:1.22.0'
classpath 'me.tatarka:gradle-retrolambda:3.6.1'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'me.tatarka.retrolambda'
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "xxxxxxxxxxxxxxxx"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
manifestPlaceholders = [fabric_io_id: "$System.env.FABRIC_KEY"]
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
dataBinding {
enabled = true
}
signingConfigs {
release {
try {
storeFile new File(STORE_FILE)
storePassword STORE_PASSWORD
keyAlias KEY_ALIAS
keyPassword KEY_PASSWORD
} catch (ex) {
throw new InvalidUserDataException("Signing configuration not found")
}
}
}
buildTypes {
release {
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
productFlavors {
development {
versionNameSuffix "-dev"
manifestPlaceholders = [
appName: "xxxx"
]
}
production {
manifestPlaceholders = [
appName: "xxxxxxxxxxxxx"
]
}
}
variantFilter { variant ->
def names = variant.flavors*.name
if ((names.contains("alpha") || names.contains("qatesting") || names.contains("sandbox") || names.contains("production"))
&& variant.buildType.name == "debug") {
variant.ignore = true
}
if (names.contains("development") && variant.buildType.name == "release") {
variant.ignore = true
}
}
applicationVariants.all { variant ->
variant.outputs.each { output ->
output.outputFile = new File(
output.outputFile.parent,
output.outputFile.name.replace(".apk", "-${variant.versionName}.apk"))
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/rxjava.properties'
}
}
ext {
supportLibraryVersion = '25.3.1'
butterKnifeVersion = '8.5.1'
leakCanaryVersion = '1.5.1'
daggerVersion = '2.10'
rxAndroidVersion = '2.0.1'
rxJavaVersion = '2.1.0'
timberVersion = '4.5.1'
jUnitVersion = '4.12'
mockitoVersion = '1.10.19'
testRunnerVersion = '0.5'
powerMockVersion = '1.6.2'
crashlyticsVersion = '2.6.8'
guavaVersion = '19.0'
googlePlayServicesVersion = '11.0.1'
contraintLayoutVersion = '1.0.2'
awsCognitoVersion = '2.4.3'
espressoVersion = '2.2.2'
retrofitVersion = '2.3.0'
jacksonConverterVersion = '2.1.0'
okHttpLoggingInterceptorVersion = '3.2.0'
firebaseJobDispatcherVersion = '0.6.0'
apacheCommonsVersion = '3.6'
multiDexVersion = '1.0.1'
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile "com.android.support:appcompat-v7:$supportLibraryVersion"
compile "com.android.support:design:$supportLibraryVersion"
compile "com.android.support:support-v4:$supportLibraryVersion"
/* Multidex */
compile "com.android.support:multidex:$multiDexVersion"
/* Views injection - Butterknife */
compile "com.jakewharton:butterknife:$butterKnifeVersion"
annotationProcessor "com.jakewharton:butterknife-compiler:$butterKnifeVersion"
/* Memory leaks detection - LeakCanary */
debugCompile "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion"
releaseCompile "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"
testCompile "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"
/* Dependency Injection - Dagger*/
compile "com.google.dagger:dagger:$daggerVersion"
annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"
/* Rx Android - Rx Java */
compile "io.reactivex.rxjava2:rxandroid:$rxAndroidVersion"
compile "io.reactivex.rxjava2:rxjava:$rxJavaVersion"
/* Application Logger - Timber*/
compile "com.jakewharton.timber:timber:$timberVersion"
/* Crashlytics - crash reporting */
compile("com.crashlytics.sdk.android:crashlytics:[email protected]") {
transitive = true;
}
/* Google analytics */
compile "com.android.support.constraint:constraint-layout:$contraintLayoutVersion"
compile "com.google.android.gms:play-services-analytics:$googlePlayServicesVersion"
compile "com.google.guava:guava:$guavaVersion"
compile "com.android.support:support-v4:$supportLibraryVersion"
/* Google play location services */
compile "com.google.android.gms:play-services-location:$googlePlayServicesVersion"
/* Amazon cognito */
compile "com.amazonaws:aws-android-sdk-cognitoidentityprovider:$awsCognitoVersion"
/* Retrofit - API rest access*/
compile "com.squareup.retrofit2:retrofit:$retrofitVersion"
/* Retrofit JSON converter with Jackson */
compile "com.squareup.retrofit2:converter-jackson:$jacksonConverterVersion"
/* Firebase job dispatcher */
compile "com.firebase:firebase-jobdispatcher:$firebaseJobDispatcherVersion"
/* Mapbox */
compile('com.mapbox.mapboxsdk:mapbox-android-sdk:[email protected]') {
transitive = true
}
compile "com.google.android.gms:play-services-places:$googlePlayServicesVersion"
/* Apache commons */
compile "org.apache.commons:commons-lang3:$apacheCommonsVersion"
/* Android testing */
testCompile "junit:junit:$jUnitVersion"
testCompile "org.mockito:mockito-core:$mockitoVersion"
androidTestCompile("com.android.support.test.espresso:espresso-core:$espressoVersion", {
exclude group: 'com.android.support', module: 'support-annotations'
})
androidTestCompile "com.android.support.test:runner:$testRunnerVersion"
androidTestCompile "com.android.support:support-annotations:$supportLibraryVersion"
testCompile "org.powermock:powermock-api-mockito:$powerMockVersion"
testCompile "org.powermock:powermock-module-junit4-rule-agent:$powerMockVersion"
testCompile "org.powermock:powermock-module-junit4-rule:$powerMockVersion"
testCompile "org.powermock:powermock-module-junit4:$powerMockVersion"
compile 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
compile 'com.fasterxml.jackson.core:jackson-core:2.8.8'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.8.8'
compile 'com.fasterxml.jackson.core:jackson-databind:2.8.8'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-v4:25.3.1'
}
実際にGoogle Playサービスを更新しようとしましたか? –
あなたのフルgradleを表示してください。 – Ibrahim
@Vlad Android Studio 2.3.3でこれを行う方法がわかりません。以前のバージョンでは、SDKマネージャからエミュレータイメージを更新しましたが、現在このオプションは利用できません。 –