在不同电脑Android Studio上运行同一个项目,出现
Could not find support-fragment.jar (com.android.support:support-fragment:27.1.1).
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/support-fragment/27.1.1/support-fragment-27.1.1.jar
Please install the Android Support Repository from the Android SDK Manager.
Open Android SDK Manager
Failed to resolve: support-fragment
Open File
解决这个问题只需要在build.gradle文件里修改allprojects 里面的repositories,把google放到jcenter前面就可以了
原文件
allprojects {
repositories {
jcenter()
mavenCentral()
maven { url 'https://maven.google.com' }
maven { url "https://dl.google.com/dl/android/maven2/"}
}
}
修改后
allprojects {
repositories {
maven { url 'https://maven.google.com' }
jcenter()
mavenCentral()
maven { url "https://dl.google.com/dl/android/maven2/"}
}
}
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有