Firebase 源代码与字节码不匹配。反编译的.class文件字节码版本51.0(Java 7)
当我尝试执行Firebase的sendEmailVerification方法时,我在调试时观察到这个错误消息:“源代码与字节码不匹配”,它还说:“反编译的.class文件字节码版本51.0(Java 7) 顺便说一句,我对使用相同sendEmailVerification代码的旧项目没有任何问题。但是在这个新项目中,我不知道为什么会发生这种情况 格雷德尔(应用程序) 格雷德尔(项目)Firebase 源代码与字节码不匹配。反编译的.class文件字节码版本51.0(Java 7),firebase,android-studio,kotlin,Firebase,Android Studio,Kotlin,当我尝试执行Firebase的sendEmailVerification方法时,我在调试时观察到这个错误消息:“源代码与字节码不匹配”,它还说:“反编译的.class文件字节码版本51.0(Java 7) 顺便说一句,我对使用相同sendEmailVerification代码的旧项目没有任何问题。但是在这个新项目中,我不知道为什么会发生这种情况 格雷德尔(应用程序) 格雷德尔(项目) 您的旧项目必须具有旧版本的firebase依赖项,并且您是否尝试过“使缓存无效/重新启动…”?我现在已经尝试过
您的旧项目必须具有旧版本的firebase依赖项,并且您是否尝试过“使缓存无效/重新启动…”?我现在已经尝试过,但它不起作用。我还删除了“C:\Users[USERNAME]\.gradle\Caches\modules-2\files-2.1\com.google.firebase”,然后删除了“使缓存无效/重新启动”“但它也不起作用。我的旧项目也有相同的依赖项。旧项目有相同的依赖项版本吗?
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.zop.mylastapp"
minSdkVersion 21
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'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
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-auth:19.2.0'
implementation 'com.google.firebase:firebase-database:19.2.1'
implementation 'com.google.firebase:firebase-firestore:21.4.1'
implementation 'com.google.firebase:firebase-storage:19.1.1'
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.70'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
classpath 'com.google.gms:google-services:4.3.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}