Category Archives: android-mnc

org.apache.http.legacy not being imported into project

I have an app with two modules. One module acts as a library and uses the Apache HTTP. Now I must compile it with MNC-Preview but, as known, this framework is no longer part of SDK framework. Being that the case, I read that it is possible to import org.apache.http.legacyas a lib to make it work.

So, basically I have this in my module gradle:

android {
    useLibrary 'org.apache.http.legacy'
    compileSdkVersion 'android-MNC'
    buildToolsVersion "23.0.0 rc3"
    (...)
}

And in the main gradle I have

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.3.0-beta4'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

I followed this and this but still getting the error that the apache package does not exist.

org.apache.http.legacy not being imported into project

I have an app with two modules. One module acts as a library and uses the Apache HTTP. Now I must compile it with MNC-Preview but, as known, this framework is no longer part of SDK framework. Being that the case, I read that it is possible to import org.apache.http.legacyas a lib to make it work.

So, basically I have this in my module gradle:

android {
    useLibrary 'org.apache.http.legacy'
    compileSdkVersion 'android-MNC'
    buildToolsVersion "23.0.0 rc3"
    (...)
}

And in the main gradle I have

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.3.0-beta4'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

I followed this and this but still getting the error that the apache package does not exist.

UPDATE: Seems that the code compiles, my bad. However the code in the IDE is marked as not found, I get a lot of errors and no auto complete. Did anyone went thru this?