老的Android工程导入as报错如下:

10:36Gradle sync failed: Could not find com.android.support:appcompat-v7:25.0.0.Required by:FuNongTong:app:unspecified (18 s 207 ms)

如果是gradle4.0及以下,增加maven { url "https://maven.google.com" },如下:

buildscript {    repositories {        jcenter()        maven { url "https://maven.google.com" }    }    dependencies {        classpath 'com.android.tools.build:gradle:2.2.3'        // NOTE: Do not place your application dependencies here; they belong        // in the individual module build.gradle files    }}allprojects {    repositories {        jcenter()        maven { url "https://maven.google.com" }    }}

如果是gradle4.0及以上,maven { url "https://maven.google.com" }替换为google()

如下:

buildscript {    repositories {        jcenter()        google()    }    }allprojects {    repositories {        jcenter()        google()    }}

 

更多相关文章

  1. 解决 Android(安卓)Studio : minSdkVersion 8 cannot be smaller
  2. [Android]在代码里运行另一个程序的方法
  3. android 百度地图 AutoCompleteTextView联想刷新实现检索
  4. Android开发入门之拨打电话
  5. Android(安卓)Studio 在命令行编译工程
  6. aar文件的libs有其他jar文件,使用时的注意点
  7. Arouter异常汇总
  8. 关于Android中res等几种文件通过InputStream方式读入工程中
  9. Android(安卓)Studio Gradle tools:replace="android:icon"错误

随机推荐

  1. android proguard 错误处理
  2. Android实现多个TextView同时显示跑马灯
  3. Fix potential event handling issue in
  4. Android 获取View宽高
  5. Wakelock API详解
  6. Android实现google消息通知
  7. Android TTS的简单应用
  8. 极客学院视频源码资料
  9. Android 上传文件[转]
  10. android studio 65536