【发布时间】:2017-05-20 20:55:09
【问题描述】:
我有 Android Studio 2.2 版,当我打开一个新项目时,它会在“消息”选项卡中显示:
错误:C:\Users\Rooprai.gradle\caches\2.14.1\scripts-remapped\settings_4a7gjv1r4bbxs9f9pza41diyj\9ejwtyixtds2dlx9q4hqm4iap\cp_settings57408229\cache.properties(系统找不到指定的文件)。
在屏幕顶部显示:
Gradle 项目同步失败。基本功能(例如编辑、调试)将无法正常工作。
构建 Gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.构建脚本 { 存储库{ 中心() } 依赖{ 类路径'com.android.tools.build:gradle:2.2.2'
// NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } }所有项目{ 存储库{ 中心() } }
任务清理(类型:删除){ 删除rootProject.buildDir }
构建类型 { 发布 { 缩小启用假 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } }
请帮忙,activity_main.xml 不起作用。
【问题讨论】:
标签: java android xml android-studio android-studio-2.2