HttpClient won't import in Android Studio

后端 未结 23 2916
一生所求
一生所求 2020-11-22 14:44

I have a simple class written in Android Studio:

package com.mysite.myapp;

import org.apache.http.client.HttpClient;

public class Whatever {
    public voi         


        
23条回答
  •  孤独总比滥情好
    2020-11-22 15:30

    TejaDroid's answer in below link helped me . Can't import org.apache.http.HttpResponse in Android Studio

    dependencies {
        compile fileTree(include: ['*.jar'], dir: 'libs')
        compile 'com.android.support:appcompat-v7:23.0.1'
    
        compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
        ...
    }
    

提交回复
热议问题