我使用一个启动画面活动和一个主屏幕活动(带导航抽屉)制作了一个基本应用程序。当我点击"运行"按钮,消息框中显示一个错误。
Android Studio版本:2.2.3。
build.gradle中的代码:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
错误如下:
错误:任务':app:compileDebugJavaWithJavac'执行失败。
无法展开ZIP' C:\ Users \ vijtech \ AndroidStudioProjects \ Deadline \ app \ build \ intermediates \ explosion-aar \ com.android.support \ design \ 25.3.1 \ jars \ classes.jar&# 39;
请帮忙。提前谢谢。
答案 0 :(得分:0)
您似乎没有该文件的权限。仔细检查您是否可以读取或写入该文件夹。
答案 1 :(得分:0)
文件 - >设置 - >构建,执行,部署 - >构建工具 - > gradle - >选中使用默认gradle包装器(推荐) radiobutton。
您可以尝试文件>无效缓存/重新启动
答案 2 :(得分:0)
尝试更新build.gradle (app)
。
转到文件 - >项目结构 - >消息 - >检查更新
然后它会显示给您,您只需要在文件中升级它。