当前位置:   article > 正文

Android Error:Execution failed for task ‘:app:compileDebugJavaWithJavac‘ 解决方案_execution failed for task ':accounte115app:compile

execution failed for task ':accounte115app:compilesigneddebugjavawithjavac'.

参考:https://blog.csdn.net/qq_36910634/article/details/94322697

把命令gradlew compileDebug --stacktrace 改成 gradlew compileDebugJavaWithJavac

编译器提示:java1.8缺少目标版本

build.gradle中添加

  compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
  • 1
  • 2
  • 3
  • 4
android {
    compileSdkVersion 30
    buildToolsVersion "30.0.2"

    defaultConfig {
        applicationId "com.kavin.richtext"
        minSdkVersion 19
        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
    }
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/盐析白兔/article/detail/735756
推荐阅读
相关标签
  

闽ICP备14008679号