问题1

127.0.0.1:8888问题

Could not resolve all artifacts for configuration ':classpath'

解决步骤

  1. 删除.m2,.gradle目录下的所有文件。
  2. 删除原来的项目,重新克隆
  3. 使用idea导入项目
  4. 在项目的build.gradle文件中,添加阿里源
repositories {
        maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
                maven{ url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
    }
  1. reimport
  2. 打开Project Settings -> Modules
  3. 检查main和test模块下content root的位置有无报红,有删掉,没有跳过。

问题2

IDEA导入gradle项目后处处报红

IDEA版本:2019.2.1

解决步骤

  1. 重新导入项目,打开Project Structure
  2. 设置srouces
  3. 设置后的

Time waits for no one.