gpt4 book ai didi

java - 任务 :app:compileDebugJavaWithJavac 执行失败

转载 作者:搜寻专家 更新时间:2023-10-30 21:12:19 26 4
gpt4 key购买 nike

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

Error:Execution failed for task ':app:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

这是我的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'
}

我不知道该怎么做。其他一切正常,应用程序在几年前首次制作时就可以正常工作。

最佳答案

为您的项目启用 multidex。将以下行添加到 gradle defaultConfig:

multiDexEnabled true

同时将 multidex 依赖添加到 gradle 的依赖中:

compile 'com.android.support:multidex:1.0.1'

关于java - 任务 :app:compileDebugJavaWithJavac 执行失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34640804/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com