在新建一个app项目的时候。R文件报错。
clean一下 提示的错误信息Error:Failed to find: com.android.support:appcompat-v7:21.
Install Repository and sync projectOpen FileOpen in Project Structure dialog
1. 找到指定位置 :build.gradle / dependencies compile 'com.android.support:appcompat-v7:23.1.1'
2. 接下来打开sdk manager
build-tools 我都下载了。
咱们看最后一个Extras下的如提示。在那个目录下的com.android.support:appcompat-v7版本
修改
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:21.0.1'
下的版本信息相同就好。然后clean一下。大功告成