D
D
DustyDaria2020-03-23 18:02:21
Java
DustyDaria, 2020-03-23 18:02:21

How to solve the problem when switching from the registration window to the authorization window?

In an Android application in java, I implemented authorization / registration and a personal account using FireBase. Everything works fine, Android Studio does not throw any errors, the project builds without visible errors (in my opinion). Registration is fully working (the database is written to), changing the password also works, BUT when you click on the button from SignupActivity.java to LoginActivity.java (authorization itself), the application crashes. After the splash screen, I tried to immediately load LoginActivity, the screen is skipped and switched immediately to SignupActivity, then exactly the same thing. I have been struggling with this problem for a long time, please help me solve (please do not judge strictly, I am still a beginner in this direction))

Part of the output of the log during assembly, I will highlight the "red lines" in bold


03/23 19:21:24: Launching 'app' on samsung SM-A305FN.
$ adb shell am start -n "com.example.purposeplanner/com.example.purposeplanner.SplashActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 3370 on device 'samsung-sm_a305fn -R58M35C2G3F'.
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
E/Zygote: isWhitelistProcess - Process is Whitelisted
E/Zygote: accessInfo : 1

I/.purposeplanne: Late-enabling -Xcheck:jni
E/.purposeplanne: Unknown bits set in runtime_flags: 0x8000
D/ActivityThread: setConscryptValidator
setConscryptValidator - put
W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
I/FirebaseInitProvider: FirebaseApp initialization successful
W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
I/FirebaseAuth: [FirebaseAuth:] Preparing to create service connection to gms implementation
I/MultiWindowDecorSupport: updateCaptionType >> [email protected][], isFloating: false, isApplication: true, hasWindowDecorCaption: false, hasWindowControllerCallback: true


D/[email protected][SignupActivity]: MSG_RESIZED: frame=(0,0,1080,2340) ci=( 0.83,0.39 ) vi=(0.83,0.39) or=1 : EGLNativeWindowType 0x7e2961b950 disconnect failed
D/[email protected][SignupActivity]: Relayout returned: old=(0,0,1080,2340) new=(0,0,1080,2340) req=(1080,2340)8 dur=11 res=0x5 s={false 0} ch=true
D/[email protected][SignupActivity]: stopped(true) old=false
D/InputMethodManager: prepareNavigationBarInfo() [email protected][SignupActivity]
getNavigationBarColor() -855310
V/InputMethodManager: Starting input: tba=com.example.purposeplanner ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
D/InputMethodManager: startInputInner - Id : 0
I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
D/InputTransport: Input channel destroyed: 'ClientS', fd=87
D/[email protected][SignupActivity]: stopped(true) old=false
D/[email protected][SignupActivity]: MSG_WINDOW_FOCUS_CHANGED 0 1
D/InputMethodManager: prepareNavigationBarInfo() [email protected][SignupActivity]
getNavigationBarColor() -855310
E/[email protected][SignupActivity]: Surface is not valid.
E/[email protected][SignupActivity]: Surface is not valid.

D/[email protected][SignupActivity]: stopped(false) old=true D/[email protected] eb41d00
[SignupActivity]: stopped(false) old=false
D/[email protected][SignupActivity]: Relayout returned: old=(0,0,1080,2340) new=(0,0,1080,2340) req=(1080,2340)0 dur=17 res=0x40001 s= {true 544300679168} ch=true
D/[email protected][SignupActivity]: RELAYOUT_RES_KEEP_ALIVE_SURFACE on 40001


AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.example.purposeplanner">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"

        tools:ignore="GoogleAppIndexingWarning"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity"></activity>
        <activity android:name=".ResetPasswordActivity" />
        <activity
            android:name=".MainListActivity"
            android:label="@string/title_activity_main_list"
            android:theme="@style/AppTheme.NoActionBar" />
        <activity android:name=".LoginActivity" />
        <activity android:name=".SignupActivity" />
        <activity android:name=".SplashActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>


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

android {
    compileSdkVersion 29
    buildToolsVersion '29.0.3'
    defaultConfig {
        applicationId "com.example.purposeplanner"
        minSdkVersion 16
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.android.material:material:1.1.0'
    implementation 'com.google.firebase:firebase-auth:19.3.0'
    implementation 'com.google.firebase:firebase-auth:19.3.0'
    testImplementation 'junit:junit:4.13'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
apply plugin: 'com.google.gms.google-services'


Further I attach screenshots in which places with the "causing problems" code will be visible.
Files related to SignupActivity, the very registration window from which the application crashes when going to the authorization window. After "dancing with a tambourine" the application does not crash, but by clicking on the button this screen was simply updated
5e78cd189edaa723533941.png
Files Related to LoginActivity
5e78cd3d5d00c166723435.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question