Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/181.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何解决错误';错误编码的_值方法类型大小为7';_Java_Android - Fatal编程技术网

Java 如何解决错误';错误编码的_值方法类型大小为7';

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

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 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)中,然后对其进行同步。这对我有用