Android studio 安装已经下载好的gradle.zip文件【ubuntu 14.04 LTS环境】

时间:2022-10-31 20:32:38

一 下载 gradle-3.3-all.zip 包

http://download.****.net/detail/t6546545/9732412

http://www.fxxz.com/soft/234043.html

二 将 gradle-3.3-all.zip 放置在 gradle/wrapper目录下,如图

Android studio 安装已经下载好的gradle.zip文件【ubuntu 14.04 LTS环境】

三 打开 gradle-wrapper.properties 文件

将最后一行的 distributionUrl 属性值复制一行,然后改成 gradle-3.3-all.zip,见下:

Android studio 安装已经下载好的gradle.zip文件【ubuntu 14.04 LTS环境】

备注:后面安装完成后,可以再将distributionUrl属性值修改回来。

四 回到 /home/zhanghu/AndroidStudioProjects/MyApplication 目录下运行:$gradlew build

zh@zh:~/AndroidStudioProjects/MyApplication$gradlew build

终端log:

zh@zh:~/AndroidStudioProjects/MyApplication$gradlew build
Downloading file:/home/zhanghu/AndroidStudioProjects/MyApplication/gradle/wrapper/gradle-3.3-all.zip
.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Unzipping /home/zhanghu/.gradle/wrapper/dists/gradle-3.3-all/eatq8ugkrljhx59baujt030h4/gradle-3.3-all.zip to /home/zhanghu/.gradle/wrapper/dists/gradle-3.3-all/eatq8ugkrljhx59baujt030h4
Set executable permissions for: /home/zhanghu/.gradle/wrapper/dists/gradle-3.3-all/eatq8ugkrljhx59baujt030h4/gradle-3.3/bin/gradle
Starting a Gradle Daemon (subsequent builds will be faster)
Download https://jcenter.bintray.com/com/android/tools/build/gradle/2.3.2/gradle-2.3.2.pom
Download https://jcenter.bintray.com/com/android/tools/build/gradle-core/2.3.2/gradle-core-2.3.2.pom
Download https://jcenter.bintray.com/com/android/tools/build/builder/2.3.2/builder-2.3.2.pom
Download https://jcenter.bintray.com/com/android/tools/lint/lint/25.3.2/lint-25.3.2.pom
Download https://jcenter.bintray.com/com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.pom
Download https://jcenter.bintray.com/com/android/tools/build/gradle-api/2.3.2/gradle-api-2.3.2.pom
Download https://jcenter.bintray.com/com/android/databinding/compilerCommon/2.3.2/compilerCommon-2.3.2.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm/5.0.4/asm-5.0.4.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-parent/5.0.4/asm-parent-5.0.4.pom
Download https://jcenter.bintray.com/org/ow2/ow2/1.3/ow2-1.3.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-commons/5.0.4/asm-commons-5.0.4.pom
Download https://jcenter.bintray.com/net/sf/proguard/proguard-gradle/5.3.2/proguard-gradle-5.3.2.pom
Download https://jcenter.bintray.com/net/sf/proguard/proguard-parent/5.3.2/proguard-parent-5.3.2.pom
Download https://jcenter.bintray.com/org/jacoco/org.jacoco.core/0.7.5.201505241946/org.jacoco.core-0.7.5.201505241946.pom
Download https://jcenter.bintray.com/org/jacoco/org.jacoco.build/0.7.5.201505241946/org.jacoco.build-0.7.5.201505241946.pom
Download https://jcenter.bintray.com/org/jacoco/org.jacoco.report/0.7.5.201505241946/org.jacoco.report-0.7.5.201505241946.pom
Download https://jcenter.bintray.com/net/sf/jopt-simple/jopt-simple/4.9/jopt-simple-4.9.pom
Download https://jcenter.bintray.com/org/sonatype/oss/oss-parent/7/oss-parent-7.pom
Download https://jcenter.bintray.com/com/google/protobuf/protobuf-java/3.0.0/protobuf-java-3.0.0.pom
Download https://jcenter.bintray.com/com/google/protobuf/protobuf-parent/3.0.0/protobuf-parent-3.0.0.pom
Download https://jcenter.bintray.com/com/google/google/1/google-1.pom
Download https://jcenter.bintray.com/org/antlr/antlr/3.5.2/antlr-3.5.2.pom
Download https://jcenter.bintray.com/org/antlr/antlr-master/3.5.2/antlr-master-3.5.2.pom
Download https://jcenter.bintray.com/org/sonatype/oss/oss-parent/9/oss-parent-9.pom
Download https://jcenter.bintray.com/com/android/tools/build/builder-model/2.3.2/builder-model-2.3.2.pom
Download https://jcenter.bintray.com/com/android/tools/build/builder-test-api/2.3.2/builder-test-api-2.3.2.pom
Download https://jcenter.bintray.com/com/android/tools/sdklib/25.3.2/sdklib-25.3.2.pom
Download https://jcenter.bintray.com/com/android/tools/sdk-common/25.3.2/sdk-common-25.3.2.pom
Download https://jcenter.bintray.com/com/android/tools/common/25.3.2/common-25.3.2.pom
Download https://jcenter.bintray.com/com/android/tools/ddms/ddmlib/25.3.2/ddmlib-25.3.2.pom
Download https://jcenter.bintray.com/com/android/tools/jack/jack-api/0.13.0/jack-api-0.13.0.pom
Download https://jcenter.bintray.com/com/android/tools/jill/jill-api/0.10.0/jill-api-0.10.0.pom
Download https://jcenter.bintray.com/com/android/tools/analytics-library/protos/25.3.2/protos-25.3.2.pom
Download https://jcenter.bintray.com/com/android/tools/analytics-library/shared/25.3.2/shared-25.3.2.pom
Download https://jcenter.bintray.com/com/android/tools/analytics-library/tracker/25.3.2/tracker-25.3.2.pom
Download https://jcenter.bintray.com/com/squareup/javawriter/2.5.0/javawriter-2.5.0.pom
Download https://jcenter.bintray.com/org/bouncycastle/bcpkix-jdk15on/1.48/bcpkix-jdk15on-1.48.pom
Download https://jcenter.bintray.com/org/bouncycastle/bcprov-jdk15on/1.48/bcprov-jdk15on-1.48.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-tree/5.0.4/asm-tree-5.0.4.pom
Download https://jcenter.bintray.com/com/android/tools/lint/lint-checks/25.3.2/lint-checks-25.3.2.pom
Download https://jcenter.bintray.com/org/eclipse/jdt/core/compiler/ecj/4.6.1/ecj-4.6.1.pom
Download https://jcenter.bintray.com/com/google/guava/guava/18.0/guava-18.0.pom
Download https://jcenter.bintray.com/com/google/guava/guava-parent/18.0/guava-parent-18.0.pom
Download https://jcenter.bintray.com/com/android/databinding/baseLibrary/2.3.2/baseLibrary-2.3.2.pom
Download https://jcenter.bintray.com/org/antlr/antlr4/4.5.3/antlr4-4.5.3.pom
Download https://jcenter.bintray.com/org/antlr/antlr4-master/4.5.3/antlr4-master-4.5.3.pom
Download https://jcenter.bintray.com/commons-io/commons-io/2.4/commons-io-2.4.pom
Download https://jcenter.bintray.com/org/apache/commons/commons-parent/25/commons-parent-25.pom
Download https://jcenter.bintray.com/org/apache/apache/9/apache-9.pom
Download https://jcenter.bintray.com/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.pom
Download https://jcenter.bintray.com/com/android/tools/annotations/24.5.0/annotations-24.5.0.pom
Download https://jcenter.bintray.com/net/sf/proguard/proguard-base/5.3.2/proguard-base-5.3.2.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-debug-all/5.0.1/asm-debug-all-5.0.1.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-parent/5.0.1/asm-parent-5.0.1.pom
Download https://jcenter.bintray.com/org/antlr/antlr-runtime/3.5.2/antlr-runtime-3.5.2.pom
Download https://jcenter.bintray.com/org/antlr/ST4/4.0.8/ST4-4.0.8.pom
Download https://jcenter.bintray.com/com/android/tools/layoutlib/layoutlib-api/25.3.2/layoutlib-api-25.3.2.pom
Download https://jcenter.bintray.com/com/android/tools/dvlib/25.3.2/dvlib-25.3.2.pom
Download https://jcenter.bintray.com/com/android/tools/repository/25.3.2/repository-25.3.2.pom
Download https://jcenter.bintray.com/com/google/code/gson/gson/2.2.4/gson-2.2.4.pom
Download https://jcenter.bintray.com/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.pom
Download https://jcenter.bintray.com/org/apache/commons/commons-parent/33/commons-parent-33.pom
Download https://jcenter.bintray.com/org/apache/apache/13/apache-13.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcomponents-client/4.1.1/httpcomponents-client-4.1.1.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/project/4.1.1/project-4.1.1.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpmime/4.1/httpmime-4.1.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcomponents-client/4.1/httpcomponents-client-4.1.pom
Download https://jcenter.bintray.com/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.pom
Download https://jcenter.bintray.com/com/android/tools/lint/lint-api/25.3.2/lint-api-25.3.2.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-analysis/5.0.4/asm-analysis-5.0.4.pom
Download https://jcenter.bintray.com/com/intellij/annotations/12.0/annotations-12.0.pom
Download https://jcenter.bintray.com/com/google/jimfs/jimfs/1.1/jimfs-1.1.pom
Download https://jcenter.bintray.com/com/google/jimfs/jimfs-parent/1.1/jimfs-parent-1.1.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcore/4.1/httpcore-4.1.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcomponents-core/4.1/httpcomponents-core-4.1.pom
Download https://jcenter.bintray.com/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.pom
Download https://jcenter.bintray.com/org/apache/commons/commons-parent/5/commons-parent-5.pom
Download https://jcenter.bintray.com/org/apache/apache/4/apache-4.pom
Download https://jcenter.bintray.com/commons-codec/commons-codec/1.4/commons-codec-1.4.pom
Download https://jcenter.bintray.com/org/apache/commons/commons-parent/11/commons-parent-11.pom
Download https://jcenter.bintray.com/com/android/tools/external/com-intellij/uast/162.2228.14/uast-162.2228.14.pom
Download https://jcenter.bintray.com/com/android/tools/external/lombok/lombok-ast/0.2.3/lombok-ast-0.2.3.pom
Download https://jcenter.bintray.com/com/android/tools/annotations/25.3.2/annotations-25.3.2.pom FAILURE: Build failed with an exception. * What went wrong:
A problem occurred configuring root project 'MyApplication'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve com.android.tools.build:manifest-merger:25.3..
Required by:
project : > com.android.tools.build:gradle:2.3. > com.android.tools.build:gradle-core:2.3. > com.android.tools.build:builder:2.3.
> Could not resolve com.android.tools.build:manifest-merger:25.3..
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/manifest-merger/25.3.2/manifest-merger-25.3.2.pom'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/manifest-merger/25.3.2/manifest-merger-25.3.2.pom'. Received status code from server: Internal Server Error * Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: mins 12.058 secs

发现上面报错了:

Could not GET 'https://jcenter.bintray.com/com/android/tools/build/manifest-merger/25.3.2/manifest-merger-25.3.2.pom'. Received status code 500 from server: Internal Server Error

这是服务器端报错了,不是本地的原因,重新运行一下命令:$gradlew build

终端log:

zh@zh:~/AndroidStudioProjects/MyApplication$gradlew build
Download https://jcenter.bintray.com/com/android/tools/build/manifest-merger/25.3.2/manifest-merger-25.3.2.pom
Download https://jcenter.bintray.com/com/android/tools/build/gradle/2.3.2/gradle-2.3.2.jar
Download https://jcenter.bintray.com/com/android/tools/build/gradle-core/2.3.2/gradle-core-2.3.2.jar
Download https://jcenter.bintray.com/com/android/tools/build/builder/2.3.2/builder-2.3.2.jar
Download https://jcenter.bintray.com/com/android/tools/lint/lint/25.3.2/lint-25.3.2.jar
Download https://jcenter.bintray.com/com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.jar
Download https://jcenter.bintray.com/com/android/tools/build/gradle-api/2.3.2/gradle-api-2.3.2.jar
Download https://jcenter.bintray.com/com/android/databinding/compilerCommon/2.3.2/compilerCommon-2.3.2.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm/5.0.4/asm-5.0.4.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm-commons/5.0.4/asm-commons-5.0.4.jar
Download https://jcenter.bintray.com/net/sf/proguard/proguard-gradle/5.3.2/proguard-gradle-5.3.2.jar
Download https://jcenter.bintray.com/org/jacoco/org.jacoco.core/0.7.5.201505241946/org.jacoco.core-0.7.5.201505241946.jar
Download https://jcenter.bintray.com/org/jacoco/org.jacoco.report/0.7.5.201505241946/org.jacoco.report-0.7.5.201505241946.jar
Download https://jcenter.bintray.com/net/sf/jopt-simple/jopt-simple/4.9/jopt-simple-4.9.jar
Download https://jcenter.bintray.com/com/google/protobuf/protobuf-java/3.0.0/protobuf-java-3.0.0.jar
Download https://jcenter.bintray.com/org/antlr/antlr/3.5.2/antlr-3.5.2.jar
Download https://jcenter.bintray.com/com/android/tools/build/builder-model/2.3.2/builder-model-2.3.2.jar
Download https://jcenter.bintray.com/com/android/tools/build/builder-test-api/2.3.2/builder-test-api-2.3.2.jar
Download https://jcenter.bintray.com/com/android/tools/sdklib/25.3.2/sdklib-25.3.2.jar
Download https://jcenter.bintray.com/com/android/tools/sdk-common/25.3.2/sdk-common-25.3.2.jar
Download https://jcenter.bintray.com/com/android/tools/common/25.3.2/common-25.3.2.jar
Download https://jcenter.bintray.com/com/android/tools/build/manifest-merger/25.3.2/manifest-merger-25.3.2.jar
Download https://jcenter.bintray.com/com/android/tools/ddms/ddmlib/25.3.2/ddmlib-25.3.2.jar
Download https://jcenter.bintray.com/com/android/tools/jack/jack-api/0.13.0/jack-api-0.13.0.jar
Download https://jcenter.bintray.com/com/android/tools/jill/jill-api/0.10.0/jill-api-0.10.0.jar
Download https://jcenter.bintray.com/com/android/tools/analytics-library/protos/25.3.2/protos-25.3.2.jar
Download https://jcenter.bintray.com/com/android/tools/analytics-library/shared/25.3.2/shared-25.3.2.jar
Download https://jcenter.bintray.com/com/android/tools/analytics-library/tracker/25.3.2/tracker-25.3.2.jar
Download https://jcenter.bintray.com/com/squareup/javawriter/2.5.0/javawriter-2.5.0.jar
Download https://jcenter.bintray.com/org/bouncycastle/bcpkix-jdk15on/1.48/bcpkix-jdk15on-1.48.jar
Download https://jcenter.bintray.com/org/bouncycastle/bcprov-jdk15on/1.48/bcprov-jdk15on-1.48.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm-tree/5.0.4/asm-tree-5.0.4.jar
Download https://jcenter.bintray.com/com/android/tools/lint/lint-checks/25.3.2/lint-checks-25.3.2.jar
Download https://jcenter.bintray.com/org/eclipse/jdt/core/compiler/ecj/4.6.1/ecj-4.6.1.jar
Download https://jcenter.bintray.com/com/google/guava/guava/18.0/guava-18.0.jar
Download https://jcenter.bintray.com/com/android/databinding/baseLibrary/2.3.2/baseLibrary-2.3.2.jar
Download https://jcenter.bintray.com/org/antlr/antlr4/4.5.3/antlr4-4.5.3.jar
Download https://jcenter.bintray.com/commons-io/commons-io/2.4/commons-io-2.4.jar
Download https://jcenter.bintray.com/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.jar
Download https://jcenter.bintray.com/net/sf/proguard/proguard-base/5.3.2/proguard-base-5.3.2.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm-debug-all/5.0.1/asm-debug-all-5.0.1.jar
Download https://jcenter.bintray.com/org/antlr/antlr-runtime/3.5.2/antlr-runtime-3.5.2.jar
Download https://jcenter.bintray.com/org/antlr/ST4/4.0.8/ST4-4.0.8.jar
Download https://jcenter.bintray.com/com/android/tools/layoutlib/layoutlib-api/25.3.2/layoutlib-api-25.3.2.jar
Download https://jcenter.bintray.com/com/android/tools/dvlib/25.3.2/dvlib-25.3.2.jar
Download https://jcenter.bintray.com/com/android/tools/repository/25.3.2/repository-25.3.2.jar
Download https://jcenter.bintray.com/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar
Download https://jcenter.bintray.com/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1.jar
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpmime/4.1/httpmime-4.1.jar
Download https://jcenter.bintray.com/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.jar
Download https://jcenter.bintray.com/com/android/tools/lint/lint-api/25.3.2/lint-api-25.3.2.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm-analysis/5.0.4/asm-analysis-5.0.4.jar
Download https://jcenter.bintray.com/com/intellij/annotations/12.0/annotations-12.0.jar
Download https://jcenter.bintray.com/com/google/jimfs/jimfs/1.1/jimfs-1.1.jar
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcore/4.1/httpcore-4.1.jar
Download https://jcenter.bintray.com/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
Download https://jcenter.bintray.com/commons-codec/commons-codec/1.4/commons-codec-1.4.jar
Download https://jcenter.bintray.com/com/android/tools/external/com-intellij/uast/162.2228.14/uast-162.2228.14.jar
Download https://jcenter.bintray.com/com/android/tools/external/lombok/lombok-ast/0.2.3/lombok-ast-0.2.3.jar
Download https://jcenter.bintray.com/com/android/tools/annotations/25.3.2/annotations-25.3.2.jar FAILURE: Build failed with an exception. * Where:
Build file '/home/zhanghu/AndroidStudioProjects/MyApplication/app/build.gradle' line: * What went wrong:
A problem occurred evaluating project ':app'.
> java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0 * Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: mins 16.611 secs

又发生了错误:

java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0

很显然是class版本不支持。经查询,Android Studio2.2必须使用JDK8及以上版本,而且是强制的。
所以呢,赶紧下了个JDK8最新版的。安装完毕,把JAVA_HOME指向了JDK8,实测JDK7和8是可以共存的。
那么,重启Android Studio后问题解决,Build Successful !

本地先将终端的jdk环境切换到JDK8,然后再执行:$gradlew build

终端log:

zh@zh:~/AndroidStudioProjects/MyApplication$java8
正在切换到 openjdk 1.8 请稍后 ---------------
openjdk version "1.8.0_111"
OpenJDK Runtime Environment (build 1.8.0_111-8u111-b14-~14.04.-b14)
OpenJDK -Bit Server VM (build 25.111-b14, mixed mode)
zh@zh:~/AndroidStudioProjects/MyApplication$gradlew build
Starting a Gradle Daemon, incompatible Daemon could not be reused, use --status for details
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to /home/zhanghu/work_tool/Android_ENV/Android_Sdk_ENV_support_android_7./ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning. Incremental java compilation is an incubating feature.
Download https://jcenter.bintray.com/junit/junit/4.12/junit-4.12.pom
Download https://jcenter.bintray.com/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.pom
Download https://jcenter.bintray.com/org/hamcrest/hamcrest-parent/1.3/hamcrest-parent-1.3.pom
Download https://jcenter.bintray.com/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar
Download https://jcenter.bintray.com/junit/junit/4.12/junit-4.12.jar
Download https://jcenter.bintray.com/com/squareup/javawriter/2.1.1/javawriter-2.1.1.pom
Download https://jcenter.bintray.com/javax/inject/javax.inject/1/javax.inject-1.pom
Download https://jcenter.bintray.com/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.pom
Download https://jcenter.bintray.com/com/google/code/findbugs/jsr305/2.0.1/jsr305-2.0.1.pom
Download https://jcenter.bintray.com/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.pom
Download https://jcenter.bintray.com/net/java/jvnet-parent/3/jvnet-parent-3.pom
Download https://jcenter.bintray.com/org/hamcrest/hamcrest-integration/1.3/hamcrest-integration-1.3.pom
Download https://jcenter.bintray.com/com/squareup/javawriter/2.1.1/javawriter-2.1.1.jar
Download https://jcenter.bintray.com/javax/inject/javax.inject/1/javax.inject-1.jar
Download https://jcenter.bintray.com/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.jar
Download https://jcenter.bintray.com/org/hamcrest/hamcrest-integration/1.3/hamcrest-integration-1.3.jar
Download https://jcenter.bintray.com/com/google/code/findbugs/jsr305/2.0.1/jsr305-2.0.1.jar
Download https://jcenter.bintray.com/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.jar
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2531Library
:app:prepareComAndroidSupportAppcompatV72531Library
:app:prepareComAndroidSupportConstraintConstraintLayout100Alpha8Library
:app:prepareComAndroidSupportSupportCompat2531Library
:app:prepareComAndroidSupportSupportCoreUi2531Library
:app:prepareComAndroidSupportSupportCoreUtils2531Library
:app:prepareComAndroidSupportSupportFragment2531Library
:app:prepareComAndroidSupportSupportMediaCompat2531Library
:app:prepareComAndroidSupportSupportV42531Library
:app:prepareComAndroidSupportSupportVectorDrawable2531Library
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:generateDebugResValues
:app:generateDebugResources
:app:mergeDebugResources
:app:processDebugManifest
:app:processDebugResources
:app:generateDebugSources
:app:incrementalDebugJavaCompilationSafeguard
:app:javaPreCompileDebug
:app:compileDebugJavaWithJavac
:app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources
:app:mergeDebugShaders
:app:compileDebugShaders
:app:generateDebugAssets
:app:mergeDebugAssets
:app:transformClassesWithDexForDebug
:app:mergeDebugJniLibFolders
:app:transformNativeLibsWithMergeJniLibsForDebug
:app:processDebugJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForDebug
:app:validateSigningDebug
:app:packageDebug
:app:assembleDebug
:app:checkReleaseManifest
:app:prepareReleaseDependencies
:app:compileReleaseAidl
:app:compileReleaseRenderscript
:app:generateReleaseBuildConfig
:app:generateReleaseResValues
:app:generateReleaseResources
:app:mergeReleaseResources
:app:processReleaseManifest
:app:processReleaseResources
:app:generateReleaseSources
:app:incrementalReleaseJavaCompilationSafeguard
:app:javaPreCompileRelease
:app:compileReleaseJavaWithJavac
:app:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
:app:compileReleaseNdk UP-TO-DATE
:app:compileReleaseSources
:app:lintVitalRelease
:app:mergeReleaseShaders
:app:compileReleaseShaders
:app:generateReleaseAssets
:app:mergeReleaseAssets
:app:transformClassesWithDexForRelease
:app:mergeReleaseJniLibFolders
:app:transformNativeLibsWithMergeJniLibsForRelease
:app:processReleaseJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForRelease
:app:packageRelease
:app:assembleRelease
:app:assemble
:app:lint
Ran lint on variant release: issues found
Ran lint on variant debug: issues found
Wrote HTML report to file:///home/zhanghu/AndroidStudioProjects/MyApplication/app/build/reports/lint-results.html
Wrote XML report to file:///home/zhanghu/AndroidStudioProjects/MyApplication/app/build/reports/lint-results.xml
:app:incrementalDebugUnitTestJavaCompilationSafeguard UP-TO-DATE
:app:javaPreCompileDebugUnitTest
:app:preDebugUnitTestBuild UP-TO-DATE
:app:prepareDebugUnitTestDependencies
:app:compileDebugUnitTestJavaWithJavac
:app:processDebugUnitTestJavaRes UP-TO-DATE
:app:compileDebugUnitTestSources
:app:mockableAndroidJar
:app:assembleDebugUnitTest
:app:testDebugUnitTest
:app:incrementalReleaseUnitTestJavaCompilationSafeguard UP-TO-DATE
:app:javaPreCompileReleaseUnitTest
:app:preReleaseUnitTestBuild UP-TO-DATE
:app:prepareReleaseUnitTestDependencies
:app:compileReleaseUnitTestJavaWithJavac
:app:processReleaseUnitTestJavaRes UP-TO-DATE
:app:compileReleaseUnitTestSources
:app:assembleReleaseUnitTest
:app:testReleaseUnitTest
:app:test
:app:check
:app:build BUILD SUCCESSFUL Total time: mins 30.199 secs

发现已经配置安装成功了!!!!!

五 运行android studio

android-studio/bin$./studio.sh

已经启动成功

Android studio 安装已经下载好的gradle.zip文件【ubuntu 14.04 LTS环境】

安装过程参考:http://dengyin2000.iteye.com/blog/2191658

"Unsupported major.minor version 52.0" 错误参考:http://www.jianshu.com/p/c5db81cbc438