由于这学期学了安卓开发,因此在网上找了几个项目,学习一下,可是我会发现,直接导入项目的话会致使许多错误,因此来总结一下我出的错误,避免大家踩坑。java
先说一下个人gradle版本是5.4.1
具体导入方法请看这位博主https://blog.csdn.net/csdn_0012306/article/details/54706344android
若是你已经成功导入,就不须要往下看了,若是没成功,请往下看:web
// 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() mavenCentral() maven{ url "https://jitpack.io"} maven{ url "https://maven.google.com"} } } task clean(type: Delete) { delete rootProject.buildDir }