使用AndroidStudio打开其他人写的工程时突然出现了Error:Failed to find target with hash string 'Google Inc.:Google APIs:23' 的错误,导致整个Project中的所有module项目都报错了,刚开始时以为是API23没有下载,通过SDK Manager下载了版本为23的API以后同步Gradle后还是报相同的错误.
原因::Google Inc.:Google APIs:23 是在Ubuntu系统中, 在Windows中是compileSdkVersion 'Google Inc.:Google APIs:23';
解决方法:把对应的Gradle中的Google Inc.:Google APIs:23改为23。如果project或者module过多不好找的话,直接在AndroidStudio界面中全局搜索Google Inc.:Google APIs:23然后替换23;(Android studio 快捷键ctrl+shift+R替换);