1、在新建一个app项目的时候。R文件报错。clean一下 提示的错误信息Error:掂迎豢畦Failed to find: com.android.support:appcompat-v7:21.+Install Repository and sync projectOpen FileOpen in Project Structure dialog
2、找到图中所示位子打开我这里的是改过的
3、接下来打开sdk managerbuild-tools 我都下载了。咱们看最后一个Extras下的如提示。在那个目录下的com.andro足毂忍珩id.support:appcompat-v7版本修改dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.android.support:appcompat-v7:21.0.1'}下的版本信息相同就好。然后clean一下。大功告成