Android Studio GitHub Project Import issue

Source: Internet
Author: User

On GitHub you see a good project, the import has some problems, recorded as follows:

Project Demo Effect: Https://github.com/asijack/PagerSlidingTabStrip

If you do not modify the profile import will be an error, this according to everyone as version of the problem will have different problems.

First import when you need to pay attention to, do not tick offline work otherwise gradle build if there is no corresponding Gradle low version is required to download the network (here need FQ)

After downloading the lower version of Gradle, the build project will be completed.

The first question I've seen here is

Build.gradle the inside version can not find the problem

The original configuration is as follows:

Buildscript {    repositories {        mavencentral ()    }    dependencies {        classpath ' com.android.tools.build:gradle:0.6.+ '    }}allprojects {    Version = Version_name    Group = Group    repositories {        mavencentral ()    }}

My tools version is 1.0 instead of the following:

  dependencies {        classpath ' com.android.tools.build:gradle:1.0.0+ '    }

The second place to modify: Gradle\wrapper the gradle-wrapper.properties below

#Thu Dec 22:57:22 CET 2013distributionbase=gradle_user_homedistributionpath=wrapper/distszipstorebase=gradle_ User_homezipstorepath=wrapper/distsdistributionurl=http\://services.gradle.org/distributions/gradle-1.8-all.zip

Instead of your own version, mine is:

#Thu Dec 22:57:22 CET 2013distributionbase=gradle_user_homedistributionpath=wrapper/distszipstorebase=gradle_ User_homezipstorepath=wrapper/distsdistributionurl=http\://services.gradle.org/distributions/gradle-2.2.1-all.zip

Generally simple project, modify these two places, should be able to import the compilation.

This project is going to change a place, gradle.properties.

Android_build_target_sdk_version=19android_build_tools_version=19android_build_sdk_version=19

I don't have this compiled version.

Read as follows:

Android_build_target_sdk_version=20android_build_tools_version=20android_build_sdk_version=20

This is the successful import.

As Gradle this east, high version incompatible low version is a bit of a hassle.

Demo

Https://github.com/asijack/PagerSlidingTabStrip

Android Studio GitHub Project Import issue

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.