AndroidStudio新建项目报错build failed
AndroidStudio新建项目报错build failed
报错信息
org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: A problem occurred configuring root project 'Test1'.
Caused by: org.gradle.internal.exceptions.LocationAwareException: A problem occurred configuring root project 'Test1'
Caused by: org.gradle.internal.exceptions.LocationAwareException: A problem occurred configuring root project 'Test1'
解决方法
把项目的build.gradle 里的buildscript 和allprojects 改成下面的配置
这是原来的配置
改为如下代码:
buildscript {
repositories {
// maven库
def cn = "http://maven.aliyun.com/nexus/content/groups/public/"
def abroad = "http://central.maven.org/maven2/"
// 先从url中下载jar若没有找到,则在artifactUrls中寻找
maven {
url cn
artifactUrls abroad
}
maven { url "http://maven.aliyun.com/nexus/content/repositories/jcenter"}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
// maven库
def cn = "http://maven.aliyun.com/nexus/content/groups/public/"
def abroad = "http://central.maven.org/maven2/"
// 先从url中下载jar若没有找到,则在artifactUrls中寻找
maven {
url cn
artifactUrls abroad
}
maven { url "http://maven.aliyun.com/nexus/content/repositories/jcenter"}
google()
}
}
AndroidStudio新建项目报错build failed的更多相关文章
- maven新建项目报错
创建了一个maven项目,报错 Errors occurred during the build. Errors running builder 'Maven Project Builder' on ...
- cocos run -p android报错 BUILD FAILED ..\ant\build.xml:892
使用编译指令生成apk文件时,出现这个错误,是因为重复引用了..\YourGame\cocos2d\cocos\platform\android\java\bin\classes.jar文件. 为什么 ...
- debian下ror新建项目报错解决
一个是缺少mysql的开发包 sudo apt-get install libmysqld-dev 还有一个报错如下 debian ExecJS::RuntimeUnavailable: Could ...
- Maven项目报错:Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clea
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) ...
- coco2dx新建项目报错,ld: -pie can only be used when targeting iOS 4.2 or later clang: error: linker command
在新建cocos2d-x以后,执行发现下面错误: ld: -pie can only be used when targeting iOS 4.2 or later clang: error: lin ...
- 解决nuxt.js新建项目报错的问题
查了一下nuxt的github才知道是node.js版本太低造成的,据说升级到8.6以上就可以了(本人直接升了9.9) node_modules\nuxt\lib\core\middleware\nu ...
- 新建项目报错'/Users/yanguobin/IdeaProjects/Demo/pom.xml' already exists in VFS
出现该情况的原因:是删除的时候并没有删除干净,点击如下位置会清除Idea的本地代码历史,然后重新创建项目就可以了
- Visual Studio 新建项目报错" this template attempted to load component assembly 'NuGet.VisualStudio.Interop, ….".
"Error: this template attempted to load component assembly 'NuGet.VisualStudio.Interop, Version ...
- STS(eclipse)3.7.3新建项目报错:org.apache.maven.archiver.MavenArchiver.getManifest(org.apache.maven.project.MavenProject, org.apache.maven.archiver.MavenArchiveConfiguration)
烦人的版本兼容问题 没有使用sts3.7.3系统内嵌的maven3.3.3,调整为稍高版本的maven3.5.2,懒得修改配置了. 升级eclipse插件吧. Eclipse,Help -> I ...
随机推荐
- IDEA 编译 Jmeter 5.0
IDEA 编译 Jmeter 5.0 1.下载源码后解压,我这边下载的是最新的『apache-jmeter-5.0_src.tar』,解压. 2.解压后 修改下列两个文件 eclipse.classp ...
- 最全JavaScript基础总结
JavaScript介绍 什么是JavaScript? Javascript是一门面向对象的,跨平台的脚本语言. JavaScript有什么特点? 解释性脚本语言 运行在浏览器(浏览器内核带有js解释 ...
- 设计模式:singleton模式
目的:限制类的实例个数只能是一个 例子: #define AGT_DECLARE_SINGLETON(ClassName) \ public: \ static ClassName *Instance ...
- Oracle11.2安装和完全卸载及卸载后重装等问题
官网:https://www.oracle.com/index.html 安装: 1.官网下载2.解压到同一个目录(database)3.运行安装4.如果提示系统版本低可在(database\stag ...
- 4.pandas的进阶查询
简单的查询其实根本不能满足实际开发的需求 需求可能是让你查一下2018年的销售额啊,2019年温度超过30℃的天数啊等等的 这些需求都是有异曲同工的,就是带条件的查询 这里我们先自己设计一个表格,并将 ...
- 曹工说Spring Boot源码(30)-- ConfigurationClassPostProcessor 实在太硬核了,为了了解它,我可能debug了快一天
写在前面的话 相关背景及资源: 曹工说Spring Boot源码(1)-- Bean Definition到底是什么,附spring思维导图分享 曹工说Spring Boot源码(2)-- Bean ...
- Eclipse创建Web项目后新建Servlet时报红叉错误 or 导入别人Web项目时报红叉错误 的解决办法
如图,出现类似红叉错误. 1.在项目名称上点击右键->Build Path->Configure Build Path 2.在弹出来的框中点击Add Library,如图 3.接下来选择U ...
- 说出来也许你不信,我被 Linux 终端嘲笑了……
人这一辈子,真的是非常不容易:读书时,被老师.同学嘲笑,工作时,被老板.同事嘲笑,就连出去撸个串儿,还可能被朋友嘲笑-- 这些也就算了,毕竟大家还都是同类,都是活生生的人.但是,你如果被 Linux ...
- pdfmake.js使用及其源码分析
公司项目在需要将页面的文本导出成DPF,和支持打印时,一直没有做过这样的功能,花了一点时间将其做了出来,并且本着开源的思想和技术分享的目的,将自己的编码经验分享给大家,希望对大家有用. 现在是有一个文 ...
- Apache HTTP Server 虚拟主机配置
Apache HTTP Server 虚拟主机配置(三) 什么是虚拟主机 "虚拟主机"是指在一个机器上运行多个网站(比如:www.company1.com 和 www.c ...