Android Firebase验证-缺少Google Play商店

Android Firebase验证-缺少Google Play商店,android,firebase,Android,Firebase,我是Firebase的新手,我试着用Firebase制作我的第一个应用程序,它只是一个注册应用程序,有两个编辑文本和一个按钮 我已经将Firebase依赖项和google-service.json文件添加到我的测试项目中 apply plugin: 'com.google.gms.google-services' 构建渐变(应用程序) 构建渐变(项目)依赖项 buildscript { repositories { jcenter() } depe

我是Firebase的新手,我试着用Firebase制作我的第一个应用程序,它只是一个注册应用程序,有两个编辑文本和一个按钮 我已经将Firebase依赖项和google-service.json文件添加到我的测试项目中

apply plugin: 'com.google.gms.google-services'
构建渐变(应用程序)

构建渐变(项目)依赖项

   buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.3'
        classpath 'com.google.gms:google-services:3.0.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
我的点击代码是

public void register(){
        String email = editTextEmail.getText().toString();
        String password = editTextPassword.getText().toString();
        if (TextUtils.isEmpty(email)||TextUtils.isEmpty(password))
        {
            Toast.makeText(MainActivity.this,"fill all the fields",Toast.LENGTH_SHORT).show();
            return;
        }
        progressDialog.setMessage("connecting..");
        progressDialog.show();
        firebaseAuth.createUserWithEmailAndPassword(email,password)
                .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
                    @Override
                    public void onComplete(@NonNull Task<AuthResult> task) {
                        if(task.isSuccessful())
                        {
                            progressDialog.hide();

                            Toast.makeText(MainActivity.this,"Registration Success",Toast.LENGTH_SHORT).show();
                        }
                        else
                        {
                            Toast.makeText(MainActivity.this,"Registration Failed",Toast.LENGTH_SHORT).show();
                        }
                    }
                });
    }

尝试使用最新版本,该版本是

 compile 'com.google.firebase:firebase-core:10.2.0'
  compile 'com.google.firebase:firebase-auth:10.2.0'

你能试着使用真实的设备吗?您的设备没有“Google Play Store”

你可以看到这个日志

03-14 13:32:00.852 2331-2619/dev.fbase.com.firebaseexample W/GooglePlayServicesUtil: Google Play Store is missing.

如果你想使用firebase,您需要安装Google Play Services 10或更高版本的android设备或Simulator。

您是否可以使用最新版本的firebase auth
编译'com.Google.firebase:firebase auth:10.0.1
,并尝试重新注入相同的内容,原因是:java.lang.NoSuchMethodError:没有静态方法zzz(Ljava/lang/Object;)Ljava/lang/Object;课堂上的Lcom/google/android/gms/common/internal/zzaa;或其超类(声明'com.google.android.gms.common.internal.zzaa'出现在/data/data/dev.fbase.com.firebaseexample/files/instant run/dex/slice com.google.android.gms-play-services-base-10.0.1C4EEBDC719D0A4150992C3E03521D5C6758AD84C-classes.dex中)你能用整个
build更新这个问题吗?gradle
文件是
app
project
@IbrahimAbousalem
10.2.0
的最新版本。@Dcoder,尝试该版本无法解析'com.google.firebase:firebase auth:10.2.0'无法解析'com.google.firebase:firebase core:10.2.0'无法解析'com.google.firebase:firebase auth:10.2.0'在Android studio上逐步更新sdk 1),转到菜单栏并单击工具>Android>sdk管理器。2) 单击SDK工具选项卡3)选中Google Play services框和Google Repository框。4) 单击应用,它将在应用新更新之前提示您。5) 单击“确定”,等待下载并再次同步您的项目,一切正常。
 compile 'com.google.firebase:firebase-core:10.2.0'
  compile 'com.google.firebase:firebase-auth:10.2.0'
03-14 13:32:00.852 2331-2619/dev.fbase.com.firebaseexample W/GooglePlayServicesUtil: Google Play Store is missing.