Search code examples
androidgradleimportsettingsloopj

Can't import android-async-http in AndroidStudio


I add com.loopj.android:android-async-http:1.4.9 in ProjectStructure (AndroidStudio 2.1.2) But when graddle script sync i get error

Failed to resolve: com.loopj.android:android-async-http:1.4.9

app/build.gradle:

apply plugin: 'com.android.application'

android {
   compileSdkVersion 24
   buildToolsVersion "21.1.2"

    defaultConfig {
       applicationId "ru.fvds.suhanov.timetable"
       minSdkVersion 18
       targetSdkVersion 24
       versionCode 1
       versionName "1.0"
   }
   buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
   }
}

repositories {
    mavenCentral()
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    /*testCompile 'junit:junit:4.12'*/
    compile 'com.android.support:appcompat-v7:24.0.0'
    compile 'com.loopj.android:android-async-http:1.4.9'
}

Help, please


Solution

  • Download jar file this link androidasync jar

    then right click app directory open module settings