任务执行失败:app:compileDebugJavaWithJavac

deq*_*c64 12 java android gradle android-gradle-plugin

我选择了别人的项目,当我要求AS在我的AVD上运行项目时,它会弹出一个错误:

错误:任务':app:compileDebugJavaWithJavac'的执行失败.

编译失败; 请参阅编译器错误输出以获取详细信

这是我的 build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"
    defaultConfig {
        applicationId 'ca.gggolf.aminutegolf'
        minSdkVersion 19
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
}
Run Code Online (Sandbox Code Playgroud)

我不知道该怎么做..其他一切都很好,应用程序在几年前首次制作时正在运行.

谢谢

deq*_*c64 0

我回到这个问题只是因为它有很多观点。

首先,感谢大家的帮助。我通过在 Android Studio 上创建一个新项目并一次导入一个类来运行该应用程序,同时确保代码仍然正常。也许创建一个新项目添加了一些旧版本项目中不存在的参数。

如果有人有更好的解释,欢迎回复!