Java 如何解决错误';错误编码的_值方法类型大小为7';
Project build.gradle:Java 如何解决错误';错误编码的_值方法类型大小为7';,java,android,Java,Android,Project build.gradle: java.lang.ClassNotFoundException: Didn't find class "androidx.core.app.CoreComponentFactory" on path: DexPathList[...] Suppressed: java.io.IOException: Failed to open dex files from /....==/base.apk because: Bad encoded_array
java.lang.ClassNotFoundException: Didn't find class "androidx.core.app.CoreComponentFactory" on path: DexPathList[...]
Suppressed: java.io.IOException: Failed to open dex files from /....==/base.apk because: Bad encoded_array value: Failure to verify dex file '.....==/base.apk': Suppressed: java.io.IOException: Failed to open dex files from /data/app/com.abstractnewsdigest-gHpWdk3tBZsBeX9bz-UJ-w==/base.apk because: Bad encoded_array value: Failure to verify dex file '/data/app/com.abstractnewsdigest-gHpWdk3tBZsBeX9bz-UJ-w==/base.apk': Bad encoded_value method type size 7
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath "io.realm:realm-gradle-plugin:5.13.0"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.1.0'
}
}
allprojects {
repositories {
jcenter()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
App build.gradle:
java.lang.ClassNotFoundException: Didn't find class "androidx.core.app.CoreComponentFactory" on path: DexPathList[...]
Suppressed: java.io.IOException: Failed to open dex files from /....==/base.apk because: Bad encoded_array value: Failure to verify dex file '.....==/base.apk': Suppressed: java.io.IOException: Failed to open dex files from /data/app/com.abstractnewsdigest-gHpWdk3tBZsBeX9bz-UJ-w==/base.apk because: Bad encoded_array value: Failure to verify dex file '/data/app/com.abstractnewsdigest-gHpWdk3tBZsBeX9bz-UJ-w==/base.apk': Bad encoded_value method type size 7
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath "io.realm:realm-gradle-plugin:5.13.0"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.1.0'
}
}
allprojects {
repositories {
jcenter()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
很晚了,但也许有人需要知道。 您应该添加
compileOptions{targetCompatibility JavaVersion.VERSION_1_8}
在android部分下的build:gradle(:app)中,然后对其进行同步。这对我有用