博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
AndroidStudio导入工程同步出现的问题
阅读量:4224 次
发布时间:2019-05-26

本文共 2397 字,大约阅读时间需要 7 分钟。

1、导入工程同步出现的问题描述:

ERROR: Failed to resolve: com.android.support:appcompat-v7:27.1.1Add Google Maven repository and sync projectShow in Project Structure dialogAffected Modules: appWARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.htmlAffected Modules: appWARNING: Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation'.It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.htmlAffected Modules: appWARNING: The specified Android SDK Build Tools version (23.0.3) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.4.2.Android SDK Build Tools 28.0.3 will be used.To suppress this warning, remove "buildToolsVersion '23.0.3'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.Remove Build Tools version and sync projectAffected Modules: app

2、解决方法:

修改module下的build.gradle,将google()放置在jcenter()之前,再次同步即可解决:
修改build.gradle前:

// Top-level build file where you can add configuration options common to all sub-projects/modules.buildscript {    repositories {        jcenter()        google()    }    dependencies {        classpath 'com.android.tools.build:gradle:3.4.2'        // NOTE: Do not place your application dependencies here; they belong        // in the individual module build.gradle files    }}allprojects {    repositories {        jcenter()        maven { url 'http://raw.github.com/saki4510t/libcommon/master/repository/' }    }}task clean(type: Delete) {    delete rootProject.buildDir}

修改build.gradle后:

// Top-level build file where you can add configuration options common to all sub-projects/modules.buildscript {    repositories {        google()        jcenter()    }    dependencies {        classpath 'com.android.tools.build:gradle:3.4.2'        // NOTE: Do not place your application dependencies here; they belong        // in the individual module build.gradle files    }}allprojects {    repositories {        google()        jcenter()        maven { url 'http://raw.github.com/saki4510t/libcommon/master/repository/' }    }}task clean(type: Delete) {    delete rootProject.buildDir}

转载地址:http://sjzqi.baihongyu.com/

你可能感兴趣的文章
Web前端学习笔记——JavaScript之事件详解
查看>>
Web前端学习笔记——JavaScript之事件、创建元素、节点操作
查看>>
Web前端学习笔记——JavaScript之正则表达式、伪数组、垃圾回收
查看>>
Web前端学习笔记——JavaScript 之继承、函数进阶
查看>>
Web前端学习笔记——JavaScript之面向对象游戏案例:贪吃蛇
查看>>
不做单元测试?小心得不偿失!嵌入式系统单元测试工具,自动生成测试用例
查看>>
一种实用的联网汽车无线攻击方法及车载安全协议
查看>>
光靠欺骗检测是不够的:对抗多目标跟踪的攻击
查看>>
基于微区块链的V2X地理动态入侵检测
查看>>
面向V2C场景的ADAS数字孪生模型构建方法
查看>>
Comma2k19数据集使用
查看>>
面向自动驾驶车辆验证的抽象仿真场景生成
查看>>
一种应用于GPS反欺骗的基于MLE的RAIM改进方法
查看>>
自动驾驶汽车GPS系统数字孪生建模(一)
查看>>
自动驾驶汽车GPS系统数字孪生建模(二)
查看>>
CUDA 学习(五)、线程块
查看>>
CUDA 学习(八)、线程块调度
查看>>
CUDA 学习(九)、CUDA 内存
查看>>
CUDA 学习(十一)、共享内存
查看>>
游戏感:虚拟感觉的游戏设计师指南——第十四章 生化尖兵
查看>>