Could not resolve com.android.tools.build:gradle:0.5.+ -
i trying build project in android studio. project uses gradle.
at time, maven.org experiencing problems , following errors:
gradle: problem occurred configuring project ':myproject'. > not resolve dependencies configuration ':myproject:classpath'. > not resolve com.android.tools.build:gradle:0.5.+. required by: android:myproject:unspecified > not head 'http://repo1.maven.org/maven2/com/android/tools/build/gradle/0.5.4/gradle-0.5.4.pom'. received status code 503 server: service temporarily unavailable
it made me think don't want depend on maven.org , internet connection builds!
is there way drop these dependencies , make android studio self-sufficient? able build android projects without internet connection , if maven.org never recover.
edit:
if understand right, there way setup local maven repository , use
repositories { mavenlocal() }
instead of
repositories { mavencentral() }
in build.gradle
files.
unfortunately, not sure if it's way , downside of approach.
update (december, 2013):
android studio supports gradle offline mode (since version 0.4.0). more information can found in release notes studio.
if you'd use maven local repo instead of remote 1 need add jar files local repository.
local maven repository located @
~/.m2/repository
to compile android projects need android builder library. can download jar http://mvnrepository.com/artifact/com.android.tools.build/builder/0.5.4 or compile source code own.
to install library type in command line:
mvn install:install-file -dgroupid=com.android.tools.build \ -dartifactid=builder \ -dversion=0.5.4 \ -dfile=builder-0.5.4.jar \ -dpackaging=jar \ -dgeneratepom=true
then in build.gradle file can use
mavenlocal()
instead of
mavencentral()
obviously may turns out need libs in local repo run android project, process of adding different libs same above.
instead of command line adding libraries can done e.g. archiva app.
http://archiva.apache.org/index.cgi
Comments
Post a Comment