2017-10-10 154 views
0

我一直在尝试运行我的Android模拟器上的应用程序,当我启动activity时显示此错误消息。我目前使用Nexus 5x x86_64 API 25,我尝试了许多不同配置的仿真器。我已经安装了系统映像,对播放服务版本进行了更改,并且还更新了所有的SDK工具。没有任何工作。我不能使用物理设备,因为我没有。这仅在我添加Firebase UI后才开始。任何人都可以帮我解决这个错误吗?更新Google Play服务。应用程序不会工作,除非你更新谷歌播放服务

我的应用程序的build.gradle:

apply plugin: 'com.android.application' 

repositories { 
    mavenLocal() 
    flatDir { 
     dirs 'libs' 
    } 
} 

android { 
    compileSdkVersion 26 
    buildToolsVersion '26.0.1' 

    defaultConfig { 
     applicationId "com.google.firebase.udacity.friendlychat" 
     minSdkVersion 16 
     targetSdkVersion 24 
     versionCode 1 
     versionName "1.0" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
    packagingOptions { 
     exclude 'META-INF/LICENSE' 
     exclude 'META-INF/LICENSE-FIREBASE.txt' 
     exclude 'META-INF/NOTICE' 
    } 
} 



dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    testCompile 'junit:junit:4.12' 

    compile 'com.android.support:design:25.2.0' 
    compile 'com.android.support:appcompat-v7:26.0.1' 


    // Displaying images 
    compile 'com.github.bumptech.glide:glide:3.6.1' 
    compile 'com.google.firebase:firebase-auth:11.4.0' 
    compile 'com.google.firebase:firebase-core:11.4.0' 
    compile 'com.google.firebase:firebase-database:11.4.0' 
    compile 'com.firebaseui:firebase-ui-auth:2.4.0' 
    compile 'com.android.support:support-annotations:25.3.1' 
} 
apply plugin: 'com.google.gms.google-services' 
+0

嗨Mohit 我想建议你使用genymotion。有一个个人使用版本,终生免费使用。 –

+0

你正面临什么错误 –

+0

@NileshRathod这是标题。 “更新Google Play服务。除非您更新Google Play服务,否则应用程序无法运行”。 –

回答

2

由于你所使用的默认情况下没有安装任何谷歌Play业务模拟器看到这条消息。由于Firebase是Google Play服务的一部分,在您运行应用程序时不会编译。得到它的工作,你可以申请以下解决方案......

  1. 要么你可以删除其中有谷歌Play商店帐户
  2. 要么安装Xamarin的Android播放器/ Genymotion然后火力地堡UI
  3. 使用真实的设备在他们手动安装播放服务工作。

我附上了在Xamarin Android Player中安装Google Play商店的教程​​3210的链接。希望能帮助到你。

+0

但是,当我使用firebase数据库时,它工作正常。为什么Firebase UI会发生这种情况? –

+0

@MohitMotwani我还没有选择Firebase数据库。但它不应该工作。如果它正在工作,那么我必须检查。 – Saikat1529

相关问题