Execution failed for task ':app:compileDebugJavaWithJavac' Android Studio 3.1 Update

后端 未结 13 830
广开言路
广开言路 2020-12-08 06:44

I am getting error after updating the version of Android Studio 3.1 Canary 6

I don\'t why its happen, before that it\'s running successfully.

<
13条回答
  •  有刺的猬
    2020-12-08 07:07

    I'm on Android Studio 3.1 Build #AI-173.4670197, built on March 22, 2018 JRE: 1.8.0_152-release-1024-b02 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Windows 10 10.

    I had the same issue and it only worked after changing my build.grade file to

        compileOptions {                                                          
        sourceCompatibility JavaVersion.VERSION_1_8 
        targetCompatibility JavaVersion.VERSION_1_8
    
    
    }
    

    Prior to this change nothing worked and all compiles would fail. previously my settings were

    sourceCompatibility JavaVersion.VERSION_1_7 
    targetCompatibility JavaVersion.VERSION_1_8
    

提交回复
热议问题