Androidstudio报错记录
Android studio3.6.1版本没有Preview!!!
唯一能预览的地方只有
还有要注意gradle这个按钮千万不要按(按了之后会变灰)
FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task ‘:app:lintVitalRelease’.
Could not resolve all task dependencies for configuration ‘:app:lintClassPath’.
Could not resolve com.android.tools.lint:lint-gradle:26.6.1.
Required by:
project :app
No cached version of com.android.tools.lint:lint-gradle:26.6.1 available for offline mode.
No cached version of com.android.tools.lint:lint-gradle:26.6.1 available for offline mode.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 5s
按了的话,build的时候会报错!
原因是gradle处于离线状态(offline),然后就下载不了库,不能进行Build。
https://blog.csdn.net/shenshibaoma/article/details/104588563
如果网络不是很好,经常导致gradle下载慢,超时,或者访问jcenter超时,可以使用下面的阿里云镜像。
将上面的内容替换就可以了。
buildscript {
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
}
}
allprojects {
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
}
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
// google()
// jcenter()
maven { url 'https://maven.aliyun.com/repository/public/' }
maven { url 'https://maven.aliyun.com/repository/google/'}
maven { url 'https://maven.aliyun.com/repository/jcenter/'}
mavenLocal()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
// google()
// jcenter()
maven { url 'https://maven.aliyun.com/repository/public/' }
maven { url 'https://maven.aliyun.com/repository/google/'}
maven { url 'https://maven.aliyun.com/repository/jcenter/'}
mavenLocal()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
上一篇: SCONS安装教程
下一篇: NC37 合并区间 算法java实现
推荐阅读
-
Androidstudio报错记录
-
Mongodb C++ driver中的逻辑操作“或” 博客分类: mongodb记录点滴 mongdblogic operationorand
-
VS2017 使用scanf报错
-
解决:Gson解析java实体类字段中包含json或其他值报错
-
win7 安装tomcat 7报错jre变量定义出错 博客分类: tomcat tomcatwin7jre 变量8080running.txt
-
win7 安装tomcat 7报错jre变量定义出错 博客分类: tomcat tomcatwin7jre 变量8080running.txt
-
C语言实现蛇形矩阵/蛇形数组并输出(C语言学习记录--陌生兔)
-
Qt 之 ActiveX控件跑官方例程记录
-
##__VA_ARGS__ 使用记录
-
networkx之error记录