2016-07-28 51 views
0

我ProjectStructure(AndroidStudio 2.1.2) 添加com.loopj.android:android-async-http:1.4.9但當graddle腳本同步,我得到錯誤無法導入Android的異步HTTP在AndroidStudio

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

應用/的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' 
} 

幫助,請

+0

你可以使用應用程序壓縮編譯'com.android.support:appcompat-v7:23.4.0'作爲這一個。讓我知道你得到了什麼 – DKV

+0

我曾試過這個,但它不起作用 –

回答

0

下載jar文件本鏈接androidasync jar

然後右鍵點擊應用程序目錄打開模塊設置

+0

我試過這個,一切正常。謝謝 –