Android: loopj 没有导入

Android: loopj is not importing

我正在使用 android studio,当我尝试添加依赖项时

 compile 'com.loopj.android:android-async-http:1.4.9'

同步项目时出错

错误:找不到:com.loopj.android:android-async-http:1.4.9 打开文件
在项目结构对话框中打开

当我打开 项目结构 -> 依赖关系 它显示在库下 但是问题是库没有同步。

当我尝试清理项目时出现类似

的错误
Error:A problem occurred configuring root project 'Frendy'.

Could not resolve all dependencies for configuration ':_debugCompile'. Could not find com.loopj.android:android-async-http:1.4.9. Searched in the following locations: file:/C:/Users/Binil/AppData/Local/Android/sdk/extras/android/m2repository/com/loopj/android/android-async-http/1.4.9/android-async-http-1.4.9.pom file:/C:/Users/Binil/AppData/Local/Android/sdk/extras/android/m2repository/com/loopj/android/android-async-http/1.4.9/android-async-http-1.4.9.jar file:/C:/Users/Binil/AppData/Local/Android/sdk/extras/google/m2repository/com/loopj/android/android-async-http/1.4.9/android-async-http-1.4.9.pom file:/C:/Users/Binil/AppData/Local/Android/sdk/extras/google/m2repository/com/loopj/android/android-async-http/1.4.9/android-async-http-1.4.9.jar Required by: :Frendy:unspecified

谁能帮帮我。

添加它应该工作的 Maven 存储库,其描述在 gradle 部分 https://github.com/loopj/android-async-http

这是我的例子 gradle :

apply plugin: 'com.android.application'

repositories {
     maven {
        url 'https://repo1.maven.org/maven2/'
  }
}

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.mine.android"
        minSdkVersion 10
        targetSdkVersion 23
        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:23.1.1'
    compile 'com.loopj.android:android-async-http:1.4.9'

}
}

只需在 build.gradle 中添加以下代码 repositories {mavenCentral()maven {url"https://oss.onatype.org/content/repositories/snapshots/" } }