Android studio编译错误Could not find com.android.support:appcompat-v7:23.4.0.
2016-11-21 10:55
706 查看
虽然很早就安装了AS,但实际使用Android studio的时间不久,上周新建的工程项目一直出问题,报错是这两个:1、Installmissing platform(s) and sync project2、Android studio Could not find com.android.support:appcompat-v7:23.4.0.针对“1”网络上面各种找,各种改,但就是没有效果,在改的过程当中也逐渐明白AS的编译系统怎么搞的了~~网上的答案很多都是说build tools版本没有和工程配置的匹配,也即是在build.gradle文件当中这个部分:
compileSdkVersion 22 buildToolsVersion "22.0.1"但是我按照大部分的说明方法进行了修正,却还是有问题。(参考:http://www.bubuko.com/infodetail-797820.html),相信大家遇到的问题都是这样的,我也认为自己是同样的问题,但是经过修改过后根本没有效果。最后仔细检查发现是自己后来把工程名称和appname修改了,但是build.gradle里面并没有同步修改!在build.gradle里面是“applicationId~~~”,就是这个id和我的工程名称或者是appname不一样导致了上面的问题!对于“2”这里的错误其实一半原因也是由于上面的名字搞错造成的,但是另外的主要原因还是支持的library不匹配,但是网络上面查了Google官方文档有这样说: If you're developingwith Android Studio, select and install the Android Support Repository iteminstead.即现在的com.android.support:appcompat-v7已经在SDK manager里面废弃了“obsolete”。可是我还是有点不明白,用现在的AndroidSupport Repository,那么共成里面要添加 com.android.support:appcompat-v7以及对应的版本吗?我目前的项目还不需要v7的东西,所以我是直接去掉了这个支持,最后clean project OK!
相关文章推荐
- Gradle sync failed: Could not find com.android.support:appcompat-v7:25.1.0.
- Error:Could not find com.android.support:appcompat-v7:25.3.1.
- Could not find any version that matches com.android.support:appcompat-v7:+
- 解决类似Error:Could not find com.android.support:appcompat-v7:25.3.1.
- Could not find any matches for com.android.support:appcompat-v7:23.+报错的解决
- Gradle sync failed: Could not find com.android.support:appcompat-v7:25.1.0.
- could not find com.android.support.appcompat-v7:XXX的问题
- Could not find com.android.support:appcompat-v7:23.1.1
- could not find com.android.support.appcompat-v7:23.4.0
- Error:Could not find com.android.support:appcompat-v7 v4等等
- Could not resolve com.android.support:appcompat-v7:22.2.1
- IDEA / Android studio 使用gradle 编译 Failed to resolve: com.android.support:appcompat-v7:27.+
- Gradle构建错误,Failed to find: 'com.android.support:appcompat-v7:23.+'解决方法
- com.android.support:appcompat-v7:15.+. Versions do not match解决办法 android studio
- Could not find android-support-v7-appcompat.apk!android问题
- android studio 报错"Failed to find: com.android.support:appcompat-v7:10.+"
- Android Studio新建工程Gradle编译报错(com.android.support:appcompat-v7:16.+)
- Failed to find : com.android.support:appcompat-v7
- gradle发生错误: down vote favorite 5 Problem : Error:Could not find com.android.support.constraint:cons