[android][studio] build a project
来源:互联网 发布:php 执行git命令 编辑:程序博客网 时间:2024/05/17 20:47
build error:
1.
Error:A problem occurred configuring root project
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:1.0.
Required by:
> Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/1.0/gradle-1.0.pom'.
> Connection to https://repo1.maven.org refused
root cause: gradle version is not correct
solution:
build.gradle
dependencies { classpath 'com.android.tools.build:gradle:1.0'
change to dependencies { classpath 'com.android.tools.build:gradle:1.0.1'
2.
Error:A problem occurred configuring root project 'AlwaysBeautySettings'.> Could not resolve all dependencies for configuration ':classpath'. > Could not resolve com.android.tools.build:gradle:1.0.1. Required by: :AlwaysBeautySettings:unspecified > Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/1.0.1/gradle-1.0.1.pom'. > Connection to https://repo1.maven.org refused
root cause: proxy connection timed out
solution:
file->settings->Appearance&Behavior->system settings->http proxy
switch to Manual proxy configuration
fulfill correct proxy server
3.
> Failed to apply plugin [id 'android'] > Gradle version 2.2 is required. Current version is 2.1. If using the gradle wrapper, try editing the distributionUrl in project/gradle/wrapper/gradle-wrapper.properties to gradle-2.2-all.zip
root cause: gradle version conflict
solution:
.gradle/wrapper/dists should be same with:
distributionUrl=http\://services.gradle.org/distributions/gradle-2.1-bin.zip change to
distributionUrl=http\://services.gradle.org/distributions/gradle-2.2-all.zip 4.
FAILURE: Build failed with an exception.* Exception is:org.gradle.execution.TaskSelectionException: Task '' not found in root project .root cause: gradle version is low
solution:
cd to project path and execute:
./gradlew./gradlew build
or download gradle directly:
http://services.gradle.org/distributions/gradle-2.2-all.zip
5.Gradle sync error:
SDK version/buildTool conflict
solution:
change project/build.gradle
android { compileSdkVersion 21 buildToolsVersion "21.1.1"
6. create gradle project from eclips, if building fail, please check:
path: project/gradle/wrapper/gradle-wrapper.properties
distributionUrl=http\://services.gradle.org/distributions/gradle-2.2-all.zip
path:project/build.gradle
android { compileSdkVersion 21 buildToolsVersion "21.1.1"
0 0
- [android][studio] build a project
- Android studio introduction No.2 -- basic setting and build a helloword project
- android project ant build
- Android Studio报错 :Failed to build project with Android studio
- Android ndk 编译出现'Build Project' has encountered a problem.Errors occurred during the build
- Android studio : Error:Gradle: A problem occurred configuring project
- android studio 1.3.1 project as a library
- Build Android Project with Gradle
- Android Studio 初始新建项目时 build gradle project 超级慢的原因
- android studio中R文件丢失以及project目录下build文件丢失解决办法
- "build gradle project info" Android Studio 导入Gradle工程时引发该问题的解决办法
- Android Studio 从git 服务器下载最新的build, Update Project
- "build gradle project info" Android Studio 导入Gradle工程时引发该问题的解决办法
- 解决android studio加载项目时一直处于build gradle project info问题
- 关于android studio打开项目时出现卡在build XXX gradle project info 或是 refresh XXX gradle project
- android studio -build
- Android Studio Build 错误
- Android Studio删除Project
- 2012年"浪潮杯"山东省第三届ACM大学生程序设计竞赛--n a^o7 !
- 《深入理解Java虚拟机》学习小记一之自动内存管理机制(一)
- android 异步加载网络图片
- C++ union 和struct的使用
- Win7忘记密码如何破解
- [android][studio] build a project
- C#2.0泛型编程之强制类型转换、继承和泛型
- 《深入理解Java虚拟机》学习小记一之自动内存管理机制(二)
- 自己实现mysql “函数索引”
- Plus One
- 用cronolog为tomcat做日志分割
- 7.2
- UI设计: UI设计的15项黄金法则
- 《深入理解Java虚拟机》学习小记一之自动内存管理机制(三)