Java 在Android studio 1.2中与gradle同步时无法解析依赖项

Java 在Android studio 1.2中与gradle同步时无法解析依赖项,java,android,android-studio,gradle,Java,Android,Android Studio,Gradle,在我的应用程序gradle文件中添加新行后,我在尝试同步gradle时遇到此错误: apply plugin: 'com.android.application' android { compileSdkVersion 22 buildToolsVersion "22.0.1" defaultConfig { applicationId "com.mzzo.palmheart" minSdkVersion 15 targ

在我的应用程序gradle文件中添加新行后,我在尝试同步gradle时遇到此错误:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

    defaultConfig {
        applicationId "com.mzzo.palmheart"
        minSdkVersion 15
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.1.1'
    compile 'com.android.support:support-v4:22.1.1'
    compile 'com.android.support:recyclerview-v7:21.0.3'
    compile 'com.readystatesoftware.systembartint:systembartint:1.0.4'
    compile 'com.jakewharton:butterknife:6.1.0'
    compile 'com.loopj.android:android-async-http:1.4.6'
    compile 'com.google.code.gson:gson:2.3.1'
    compile 'com.umeng.analytics:analytics:latest.integration'
    compile project(':FloatingActionButton')
    compile files('libs/andbase.jar')
    compile files('libs/AndroidSwipeLayout-v1.1.8.jar')
    compile files('libs/umeng-update-v2.6.0.1.jar')
}
编译“com.umeng.analytics:analytics:latest.integration”

错误如下所示:

错误:配置项目“:app”时出现问题

无法解析配置“”的所有依赖项:应用:\ u debugCompile'。 无法解析com.umeng.analytics:analytics:latest.integration。 要求: PalmHeart:应用程序:未指定 未能列出com.umeng.analytics:analytics的版本。 无法从加载Maven元数据。 无法获取“”。 拒绝连接到

我认为我的http代理可能有问题,您可以查看下面的图片:

这是我的gradle文件:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

    defaultConfig {
        applicationId "com.mzzo.palmheart"
        minSdkVersion 15
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.1.1'
    compile 'com.android.support:support-v4:22.1.1'
    compile 'com.android.support:recyclerview-v7:21.0.3'
    compile 'com.readystatesoftware.systembartint:systembartint:1.0.4'
    compile 'com.jakewharton:butterknife:6.1.0'
    compile 'com.loopj.android:android-async-http:1.4.6'
    compile 'com.google.code.gson:gson:2.3.1'
    compile 'com.umeng.analytics:analytics:latest.integration'
    compile project(':FloatingActionButton')
    compile files('libs/andbase.jar')
    compile files('libs/AndroidSwipeLayout-v1.1.8.jar')
    compile files('libs/umeng-update-v2.6.0.1.jar')
}
我在谷歌上搜索了很多,但仍然不知道为什么,希望我能在这里找到答案


非常感谢。

删除行并再次生成/同步,以确保是该行导致了问题。请发布build.gradle文件。删除该行后,gradle工作正常,但当我尝试添加编译“”行时,再次显示相同的错误。我想知道我的http代理有什么问题。我也有这个问题,有什么解决办法吗?