firebase - 源代码与字节码不匹配。反编译的 .class 文件字节码版本 51.0 (Java 7)
问题描述
当我尝试执行 Firebase 的 sendEmailVerification 方法时,我在调试时观察到此错误消息:“源代码与字节码不匹配”它还说:“反编译的 .class 文件字节码版本 51.0 (Java 7)。
顺便说一句,我对使用相同 sendEmailVerification 代码的旧项目没有任何问题。但在这个新项目中,我不知道为什么会这样。
分级(应用程序)
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
}
解决方案
推荐阅读
- splunk - 如何使用 REX 命令提取 splunk 中的多个字段?
- c# - 如何在 C# 中或使用 Windows 命令终止 RabbitMQ 连接?
- javascript - TypeError:无法读取未定义的属性“rtl”
- c - 计数直到某个数字向下并通过递归备份
- javascript - 数据库写入的块序列化
- facebook-ads-api - 我们如何使用 Python SDK 访问 Facebook Marketing API 中的 Ads Action Stats 列表?
- c# - 无法加载文件或程序集 'Microsoft.Xrm.Sdk,版本 = 9.0.0.0
- r - 如何将相关检验的 p 值和 lm 的 R² 添加到散点图?
- reactjs - 从 /src 导入反应模块而不是 node_modules
- sql - 更换托架空间