Java 使用Firebase数据库的Android应用程序在启动时不断崩溃?
因此,我目前正在尝试将用户详细信息存储到数据库中,但是程序在执行时没有提到任何错误,但是当试图打开它时,应用程序不断崩溃。这是我在logcat中的错误代码: 如有要求,将提供代码要点 格雷德尔先生Java 使用Firebase数据库的Android应用程序在启动时不断崩溃?,java,android,firebase,Java,Android,Firebase,因此,我目前正在尝试将用户详细信息存储到数据库中,但是程序在执行时没有提到任何错误,但是当试图打开它时,应用程序不断崩溃。这是我在logcat中的错误代码: 如有要求,将提供代码要点 格雷德尔先生 apply plugin: 'com.android.application' apply plugin: 'com.google.gms.google-services' android { compileSdkVersion 30 buildToolsVersion "
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 30
buildToolsVersion "30.0.2"
defaultConfig {
applicationId "com.example.finalyearprojectapp"
minSdkVersion 19
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation 'com.android.support:multidex:1.0.3'
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.google.firebase:firebase-firestore:22.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
尝试添加多索引支持
defaultConfig {
// Your previous stuffs
multiDexEnabled true
}
有关更多信息,请访问此线程。这也会很有帮助:您也可以添加导入吗?添加了我的build.gradle,我假设它是导入?