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