Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/383.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Firebase身份验证仅适用于调试版本_Java_Android_Firebase_Firebase Authentication - Fatal编程技术网

Java Firebase身份验证仅适用于调试版本

Java Firebase身份验证仅适用于调试版本,java,android,firebase,firebase-authentication,Java,Android,Firebase,Firebase Authentication,我在google play上有一个应用程序: 我有一个大问题。我无法使用电话号码获得firebase身份验证以在签名版本上工作。事实上,它只适用于调试版本(在发布版本中,我插入数字并单击send按钮时,toast返回:未知错误)。。。正是因为这个原因,我无法显示日志,因为relase版本中只有错误。。。你能帮我吗?我给你留下密码: 重要的注册活动线 @Override public void onVerificationFailed(FirebaseException e

我在google play上有一个应用程序: 我有一个大问题。我无法使用电话号码获得firebase身份验证以在签名版本上工作。事实上,它只适用于调试版本(在发布版本中,我插入数字并单击send按钮时,toast返回:未知错误)。。。正是因为这个原因,我无法显示日志,因为relase版本中只有错误。。。你能帮我吗?我给你留下密码:

重要的注册活动线

@Override
            public void onVerificationFailed(FirebaseException e) {

                if (e instanceof FirebaseAuthInvalidCredentialsException) {
                    Toast.makeText(RegistrationActivity.this, "Numero inserito non valido...", Toast.LENGTH_SHORT).show();
                }
                else if (e instanceof FirebaseTooManyRequestsException) {
                    Toast.makeText(RegistrationActivity.this, "Troppe richieste per questo numero di telefono, riprova tra 24h", Toast.LENGTH_SHORT).show();
                }

                else if (e instanceof FirebaseNetworkException){
                    Toast.makeText(RegistrationActivity.this, "Errore di rete...", Toast.LENGTH_SHORT).show();
                }

                else {

                    Toast.makeText(RegistrationActivity.this, "Errore sconosciuto", Toast.LENGTH_SHORT).show();
                }

                Log.e(TAG,  "err : " + e);
                loadingBar.dismiss();


               // Toast.makeText(RegistrationActivity.this, "Numero inserito non valido...", Toast.LENGTH_SHORT).show();
                relativeLayout.setVisibility(View.VISIBLE);


                continueAndNextBtn.setText("Continue"); //Continue
                codeText.setVisibility(View.GONE);


            }
**注册活动:**

构建梯度:应用程序

    apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.3"
    lintOptions {
        checkReleaseBuilds false
        // Or, if you prefer, you can continue to check for errors in release builds,
        // but continue the build even when errors are found:
        abortOnError false
    }

    defaultConfig {
        applicationId "com.conta.ftof"
        minSdkVersion 21
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'

        }
    }
}

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.firebase:firebase-auth:19.3.1'
    implementation 'com.google.firebase:firebase-database:19.3.0'
    implementation 'com.google.firebase:firebase-core:17.4.3'
    implementation 'com.firebaseui:firebase-ui-database:3.2.2'
    implementation 'com.hbb20:ccp:2.1.9'
    implementation 'pub.devrel:easypermissions:0.4.0'
    implementation 'com.android.support:percent:29.0.0'
    implementation 'com.google.android.gms:play-services-ads:19.4.0'


    implementation 'com.google.firebase:firebase-storage:19.1.1'
    implementation 'com.google.android.material:material:1.1.0'
    implementation 'androidx.navigation:navigation-fragment:2.2.2'
    implementation 'androidx.navigation:navigation-ui:2.2.2'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
    implementation 'com.opentok.android:opentok-android-sdk:2.15.3'
    implementation 'pub.devrel:easypermissions:0.4.0'
    implementation 'com.squareup.picasso:picasso:2.71828'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    implementation 'com.google.firebase:firebase-analytics:17.4.3'

}
构建渐变

    // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:4.0.0"
        classpath 'com.google.gms:google-services:4.3.3'

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

allprojects {
    repositories {
        google()
        jcenter()

        maven { url 'https://maven.google.com'}
        maven { url 'https://tokbox.bintray.com/maven'}
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
错误无日志nel调试

        2020-10-14 21:46:16.629 12564-12564/com.conta.ftof E/RegistrationActivity: err : com.google.firebase.FirebaseException: An internal error has occurred. [ Error code:39 ]
        
        2020-10-14 21:46:16.697 2026-4029/? E/Auth: [GoogleAccountDataServiceImpl] getToken() -> BAD_AUTHENTICATION. Account: <ELLIDED:718006122>, App: com.google.android.gms, Service: oauth2:https://www.googleapis.com/auth/emeraldsea.mobileapps.doritos.cookie
        rlv: Long live credential not available.
            at gbq.a(:com.google.android.gms@202614030@20.26.14 (100408-320008519):17)
            at gac.a(:com.google.android.gms@202614030@20.26.14 (100408-320008519):118)
            at cqx.a(:com.google.android.gms@202614030@20.26.14 (100408-320008519):235)
            at cqx.a(:com.google.android.gms@202614030@20.26.14 (100408-320008519):108)
            at cqx.a(:com.google.android.gms@202614030@20.26.14 (100408-320008519):240)
            at cox.onTransact(:com.google.android.gms@202614030@20.26.14 (100408-320008519):5)
            at android.os.Binder.transact(Binder.java:675)
            at csu.onTransact(:com.google.android.gms@202614030@20.26.14 (100408-320008519):2)
            at android.os.Binder.transact(Binder.java:675)
            at zyq.onTransact(:com.google.android.gms@202614030@20.26.14 (100408-320008519):17)
            at android.os.Binder.execTransact(Binder.java:739)
        
            2020-10-14 21:46:16.718 612-832/? E/BufferQueueProducer: [] mConsumerName == NULL!!!!!!
    2020-10-14 21:46:16.577 688-1286/? E/dubaid: [DubaiUtils.h] parseMessage# Failed to find second tag: uid=
    2020-10-14 21:46:16.577 688-1286/? E/dubaid: [SystemHandler.cpp] parsePartialWakelockAcquiredMessage# Failed to parse count: lock=220525660 tag=*gms_scheduler*:internal count=0
    2020-10-14 21:46:16.577 688-1286/? E/dubaid: [SystemHandler.cpp] onPartialWakelockAcquireMessage# Failed to parse message
    2020-10-14 21:46:16.580 2664-7832/? E/Volley: [420] BasicNetwork.performRequest: Unexpected response code 503 for https://www.googleapis.com/identitytoolkit/v3/relyingparty/sendVerificationCode?alt=proto&key=AIzaSyA3J5SF6W94IhtZ_dQ6UOVqUhIN133zrhU

2020-10-14 21:46:15.834 1272-3654/? E/WifiService: enforceCanAccessScanResults: hiding ssid and bssidLocation mode is disabled for the device
2020-10-14 21:46:16.629 12564-12564/com.conta.ftof E/RegistrationActivity:err:com.google.firebase.firebase异常:发生内部错误。[错误代码:39]
2020-10-14 21:46:16.697 2026-4029/? E/Auth:[GoogleAccountDataServiceImpl]getToken()->错误的身份验证。帐户:,应用程序:com.google.android.gms,服务:oauth2:https://www.googleapis.com/auth/emeraldsea.mobileapps.doritos.cookie
rlv:长寿凭据不可用。
在gbq.a(:com.google.android)。gms@202614030@20.26.14 (100408-320008519):17)
在gac.a(:com.google.android)。gms@202614030@20.26.14 (100408-320008519):118)
在cqx.a(:com.google.android)。gms@202614030@20.26.14 (100408-320008519):235)
在cqx.a(:com.google.android)。gms@202614030@20.26.14 (100408-320008519):108)
在cqx.a(:com.google.android)。gms@202614030@20.26.14 (100408-320008519):240)
在cox.onTransact(:com.google.android)。gms@202614030@20.26.14 (100408-320008519):5)
位于android.os.Binder.transact(Binder.java:675)
在csu.onTransact(:com.google.android)。gms@202614030@20.26.14 (100408-320008519):2)
位于android.os.Binder.transact(Binder.java:675)
在zyq.onTransact(:com.google.android)。gms@202614030@20.26.14 (100408-320008519):17)
位于android.os.Binder.execTransact(Binder.java:739)
2020-10-14 21:46:16.718 612-832/? E/BufferQueueProducer:[]mConsumerName==NULL!!!!!!
2020-10-14 21:46:16.577 688-1286/? E/dubaid:[DubaiUtils.h]parseMessage#找不到第二个标记:uid=
2020-10-14 21:46:16.577 688-1286/? E/dubaid:[SystemHandler.cpp]parsePartialWakelockAcquiredMessage#无法分析计数:lock=220525660标记=*gms_调度程序*:内部计数=0
2020-10-14 21:46:16.577 688-1286/? E/dubaid:[SystemHandler.cpp]onPartialWakelockAcquireMessage#无法分析消息
2020-10-14 21:46:16.580 2664-7832/? E/Volley:[420]基本网络。性能请求:的意外响应代码503https://www.googleapis.com/identitytoolkit/v3/relyingparty/sendVerificationCode?alt=proto&key=AIzaSyA3J5SF6W94IhtZ_dQ6UOVqUhIN133zrhU
2020-10-14 21:46:15.834 1272-3654/? E/WifiService:EnforceCanAccess扫描结果:设备禁用隐藏ssid和bssidLocation模式

为发布添加sha-1,并将新的json添加到project@EliasFazel我该怎么做?@Elias Fazel好的,但是我应该在我的firebase项目中用新的sha1创建一个新的应用程序吗?我应该用旧的json文件覆盖新的json文件吗?这个教程可以吗@Elias Fazel我试过了,但没有成功,未知错误toast不断出现。我尝试添加一个sha1(没有删除旧的调试文件)并下载新的json覆盖旧的json请帮助我。