Я разработал приложение, которое использует службы облачных сообщений Firebase, когда я запускаю приложение на API эмулятора Android Studio 25, оно работает нормально и получает маркер регистрации, но когда я отлаживаю его на API проигрывателя приложений bluestacks 19
- у него есть Googleустановленные службы - bluestacks показывает мне ошибку "FirebaseInstanceId: BackgroundSyncfailed: PHONE_REGISTRATION_ERROR
файл приложения gradle
apply plugin: 'com.android.application'
android {
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'}
compileSdkVersion 26
buildToolsVersion "26.0.3"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.dania.Test"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "2.2"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/license.txt'
exclude 'META-INF/notice.txt'
}
dexOptions {
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',
{
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:recyclerview-v7:26.1.0'
compile 'com.android.support:design:26.1.0'
compile 'com.firebase:firebase-client-android:2.5.2'
compile 'com.google.firebase:firebase-database:10.2.0'
compile 'com.google.firebase:firebase-messaging:10.2.0'
}
apply plugin: 'com.google.gms.google-services'
файл манифеста, в котором объявлены службы
<service android:name=".FireBaseService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service
android:name=".FCMTokenRefreshListenerService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
<service android:name=".FCMRegistrationService" />