无法构建gradle;任务 ':app:processDebugMainManifest' 执行失败

时间:2021-05-15 17:59:43

标签: android android-studio gradle android-gradle-plugin build.gradle

<块引用>

任务“:app:processDebugMainManifest”执行失败。 无法使字段私有 final java.lang.String java.io.File.path 可访问:模块 java.base 不会“打开 java.io”到未命名的模块 @3bcb9348

我在 Android-Studio 中构建项目时收到此错误,我尝试了几乎所有堆栈溢出和 youtube 上建议的方法,我尝试完全删除所有 android studio 文件并重新安装它们,但仍然无法排序

这些是我的 build.gradle 文件

build.gradle:(模块:EmployerModule.app)

*plugins {
    id 'com.android.application'
}
android {
    compileSdkVersion 30
    buildToolsVersion "30.0.3"
    defaultConfig {
        applicationId "com.example.employermodule"
        minSdkVersion 18
        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'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}
dependencies {
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.google.android.material:material:1.3.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}*

Build.gradle(EmployerModule)

*// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:4.2.1"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
        jcenter() // Warning: this repository is going to shut down soon
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}*

0 个答案:

没有答案