我已经安装了com.android.support:appcompat-v7:23.0.0和其他stuff.The应用程序正在运行完美我的My朋友的机器和我们有一切相同的设置。请大家帮我。提前感谢错误:无法解决:com.android.support:appcompat-v7:24.0.0

应用程序级gradle在这里: .................... ........................................

apply plugin: 'com.android.application'

/*apply plugin: 'com.google.gms.google-services'*/

android {

compileSdkVersion 23

buildToolsVersion '23.0.1'

defaultConfig {

applicationId "com.abc.mobile"

minSdkVersion 19

targetSdkVersion 23

versionCode 17

versionName '2.0'

// vectorDrawables.useSupportLibrary = true

}

buildTypes {

release {

minifyEnabled false

proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

}

}

lintOptions {

abortOnError false

}

productFlavors {

}

/*aaptOptions{additionalParameters "--no-version-vectors"}

defaultConfig{vectorDrawables.useSupportLibrary = true}*/

}

dependencies {

compile fileTree(dir: 'libs', include: ['*.jar'])

compile project(':backbasecxp-1.7.1')

compile 'com.google.guava:guava:18.0'

compile 'com.android.support:appcompat-v7:23.0.0'

compile 'com.android.support:design:23.0.0'

compile 'de.hdodenhof:circleimageview:1.2.1'

compile 'com.google.code.gson:gson:2.3'

compile 'com.squareup.okhttp3:okhttp:3.4.1'

compile 'com.afollestad:digitus:0.2.12'

//compile 'com.google.android.gms:play-services-auth:7.8.0'

//compile 'com.google.firebase:firebase-messaging:9.0.2'

}

task printVersionOnFile {

def version = new File('version.txt')

version.text = android.defaultConfig.versionName

}

这里是项目级别gradle: ............................................. ............................................. .............................

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

repositories {

jcenter()

}

dependencies {

classpath 'com.android.tools.build:gradle:2.1.2'

// NOTE: Do not place your application dependencies here; they belong

// in the individual module build.gradle files

//classpath 'com.google.gms:google-services:3.0.0'

}

}

allprojects {

repositories {

jcenter()

// maven {

// url 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2'

// }

}

}

Meessage Gradle: ........................................ ............................

C:\Manoj\IDFCLATEST\app\build.gradle

Error:Failed to resolve: com.android.support:recyclerview-v7:24.0.0

Install Repository and sync projectOpen FileShow in Project Structure dialog

Error:Failed to resolve: com.android.support:appcompat-v7:24.0.0

Install Repository and sync projectOpen FileShow in Project Structure dialog

Error:Failed to resolve: com.android.support:support-annotations:24.0.0

Install Repository and sync projectOpen FileShow in Project Structure dialog

Error:Failed to resolve: com.android.support:support-v4:24.0.0

Install Repository and sync projectOpen FileShow in Project Structure dialog

Gradle Console: ............ .................................................. .......

Executing tasks: [clean, :app:generateDebugSources, :app:prepareDebugUnitTestDependencies, :app:mockableAndroidJar, :app:generateDebugAndroidTestSources]

Configuration on demand is an incubating feature.

FAILURE: Build failed with an exception.

* What went wrong:

A problem occurred configuring project ':app'.

> Could not resolve all dependencies for configuration ':app:_debugCompile'.

> Could not resolve com.android.support:appcompat-v7:24.0.0.

Required by:

IDFCLATEST:app:unspecified

IDFCLATEST:app:unspecified > com.android.support:design:23.0.0

> Could not resolve com.android.support:appcompat-v7:24.0.0.

> Could not get resource 'https://jcenter.bintray.com/com/android/support/appcompat-v7/24.0.0/appcompat-v7-24.0.0.pom'.

> Could not GET 'https://jcenter.bintray.com/com/android/support/appcompat-v7/24.0.0/appcompat-v7-24.0.0.pom'.

> No route to host: connect

> Could not resolve com.android.support:support-v4:24.0.0.

Required by:

IDFCLATEST:app:unspecified > com.android.support:design:23.0.0

> Could not resolve com.android.support:support-v4:24.0.0.

> Could not get resource 'https://jcenter.bintray.com/com/android/support/support-v4/24.0.0/support-v4-24.0.0.pom'.

> Could not GET 'https://jcenter.bintray.com/com/android/support/support-v4/24.0.0/support-v4-24.0.0.pom'.

> No route to host: connect

> Could not resolve com.android.support:appcompat-v7:24.0.0.

Required by:

IDFCLATEST:app:unspecified > com.afollestad:digitus:0.2.12

IDFCLATEST:app:unspecified > com.afollestad:digitus:0.2.12 > com.afollestad.material-dialogs:core:0.8.6.0

> Could not resolve com.android.support:appcompat-v7:24.0.0.

> Could not get resource 'https://jcenter.bintray.com/com/android/support/appcompat-v7/24.0.0/appcompat-v7-24.0.0.pom'.

> Could not GET 'https://jcenter.bintray.com/com/android/support/appcompat-v7/24.0.0/appcompat-v7-24.0.0.pom'.

> No route to host: connect

> Could not resolve com.android.support:support-v4:24.0.0.

Required by:

IDFCLATEST:app:unspecified > com.afollestad:digitus:0.2.12 > com.afollestad.material-dialogs:core:0.8.6.0

> Could not resolve com.android.support:support-v4:24.0.0.

> Could not get resource 'https://jcenter.bintray.com/com/android/support/support-v4/24.0.0/support-v4-24.0.0.pom'.

> Could not GET 'https://jcenter.bintray.com/com/android/support/support-v4/24.0.0/support-v4-24.0.0.pom'.

> No route to host: connect

> Could not resolve com.android.support:support-annotations:24.0.0.

Required by:

IDFCLATEST:app:unspecified > com.afollestad:digitus:0.2.12 > com.afollestad.material-dialogs:core:0.8.6.0

> Could not resolve com.android.support:support-annotations:24.0.0.

> Could not get resource 'https://jcenter.bintray.com/com/android/support/support-annotations/24.0.0/support-annotations-24.0.0.pom'.

> Could not GET 'https://jcenter.bintray.com/com/android/support/support-annotations/24.0.0/support-annotations-24.0.0.pom'.

> No route to host: connect

> Could not resolve com.android.support:recyclerview-v7:24.0.0.

Required by:

IDFCLATEST:app:unspecified > com.afollestad:digitus:0.2.12 > com.afollestad.material-dialogs:core:0.8.6.0

> Could not resolve com.android.support:recyclerview-v7:24.0.0.

> Could not get resource 'https://jcenter.bintray.com/com/android/support/recyclerview-v7/24.0.0/recyclerview-v7-24.0.0.pom'.

> Could not GET 'https://jcenter.bintray.com/com/android/support/recyclerview-v7/24.0.0/recyclerview-v7-24.0.0.pom'.

> No route to host: connect

> Could not resolve com.android.support:appcompat-v7:24.0.0.

Required by:

IDFCLATEST:app:unspecified > com.afollestad:digitus:0.2.12 > com.afollestad.material-dialogs:core:0.8.6.0 > me.zhanghai.android.materialprogressbar:library:1.1.6

> Could not resolve com.android.support:appcompat-v7:24.0.0.

> Could not get resource 'https://jcenter.bintray.com/com/android/support/appcompat-v7/24.0.0/appcompat-v7-24.0.0.pom'.

> Could not GET 'https://jcenter.bintray.com/com/android/support/appcompat-v7/24.0.0/appcompat-v7-24.0.0.pom'.

> No route to host: connect

> Could not resolve com.android.support:support-annotations:24.0.0.

Required by:

IDFCLATEST:app:unspecified > com.afollestad:digitus:0.2.12 > com.afollestad.material-dialogs:core:0.8.6.0 > me.zhanghai.android.materialprogressbar:library:1.1.6

> Could not resolve com.android.support:support-annotations:24.0.0.

> Could not get resource 'https://jcenter.bintray.com/com/android/support/support-annotations/24.0.0/support-annotations-24.0.0.pom'.

> Could not GET 'https://jcenter.bintray.com/com/android/support/support-annotations/24.0.0/support-annotations-24.0.0.pom'.

> No route to host: connect

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

+1

我认为代理或防火墙阻止了您的连接。 –

+0

但是在我朋友的笔记本电脑上,它运行正常。他使用相同的网络 –

+0

创建新项目时是否有任何错误? –

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐