代码之家  ›  专栏  ›  技术社区  ›  mcfly soft

执行任务失败:IntelliJ中的app:compileDebugJavaWithJavac

  •  0
  • mcfly soft  · 技术社区  · 6 年前

    但我得到一个 任务“:app:compileDebugJavaWithJavac”的执行失败

    我的毕业生:

    apply plugin: 'com.android.application'
    
    android {
        lintOptions {
            checkReleaseBuilds false
            // Or, if you prefer, you can continue to check for errors in release builds,
            // but continue the build even when errors are found:
            abortOnError false
        }
        compileSdkVersion 27
        buildToolsVersion '27.0.2'
        defaultConfig {
            applicationId "xxx"
            minSdkVersion 19
            targetSdkVersion 25
            versionCode 1
            versionName "1.0"
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    //        manifestPlaceholders = [versionCode:"161", versionName:"2.37"]
            vectorDrawables.useSupportLibrary = true
        }
        buildTypes {
            release {
                minifyEnabled false
                buildConfigField "String", "appID", "\"RELEASE\""
            }
            full {
                buildConfigField "String", "appID", "\"FULL\""
            }
            debug {
            }
        }
        compileOptions.encoding = 'ISO-8859-1'
    
    }
    
    dependencies {
        compile fileTree(include: ['*.jar'], dir: 'libs')
        androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
            exclude group: 'com.android.support', module: 'support-annotations'
        })
        compile 'com.android.support:appcompat-v7:27.0.2'
        testCompile 'junit:junit:4.12'
        compile 'org.apache.commons:commons-lang3:3.5'
    }
    

    有人能帮我个忙吗?

    0 回复  |  直到 6 年前
        1
  •  0
  •   Viraj S    6 年前

    我认为,您的TargetedSdkVersion低于compileSdkVersion。将目标设置为27并尝试同步。