Android Studio 编译版本不对,错误信息如下:
Error:A problem occurred configuring project ':app'.
Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
> Could not find any version that matches com.android.support:appcompat-v7:27.+.
Versions that do not match:
26.0.0-alpha1
25.3.1
25.3.0
25.2.0
25.1.1
+ 31 more
解决办法:
打开build.gradle (Module:app)文件
把compile 'com.android.support:appcompat-v7:27.+' 这一行最后V7:27.+改成V7:+就可以了。
就是让系统不纠结于V7版本下的子版本号。

按此改后,编译无错通过。

在遇到Android Studio项目配置错误,无法找到appcompat-v7特定版本时,可以通过修改build.gradle文件来解决。将compile 'com.android.support:appcompat-v7:27.+'中的27.+改为+,允许系统自动选择兼容的子版本,从而成功编译项目。
1209

被折叠的 条评论
为什么被折叠?



