2

I have tried to send a picture with http-post, like it´s described here: Sending images using Http Post

I have downloaded the libarys and put them into "libs", but AndroidStudio says:

"Error: Gradle: error: package org.apache.http.entity.mime does not exist"

How can i solve this problem, any ideas?

Thanks for your help.

Edit: My build.gradle file contains:

    buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.5.+'
    }
}
apply plugin: 'android'

repositories {
    mavenCentral()
}

dependencies {
    compile 'com.android.support:support-v4:13.0.+'
}

android {
    compileSdkVersion 17
    buildToolsVersion "17.0.0"

    defaultConfig {
        minSdkVersion 8
        targetSdkVersion 17
    }
}

I have downloaded the apache-mime4j-0.6.rar and httpmime-4.1.2.jar and put them into "libs". Then i clicked in AndroidStudio on File/ProjectStructure and i have add the two folders.

Maybe its helpfull, if i post the error message: https://i.stack.imgur.com/OnSaZ.png

Community
  • 1
  • 1
NewDeveloper
  • 120
  • 3
  • 15
  • you have to modify your build.gradle script: http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Local-packages gradle can also download it for you from maven repo ... instead `compile file(...)` use `compile 'org.apache.james:apache-mime4j:0.7.2'` – Selvin Aug 22 '13 at 10:23
  • thanks for your help, but what do mean? I have updated my post with my build.gradle-file – NewDeveloper Aug 22 '13 at 10:36
  • 1
    I tryed to add "compile fileTree(dir: 'libs', include: '*.jar')" in build.gradle, then i could run the app. But then it says "unfortunally ... has stopped; JavaClassNotFoundException" Has nobody the same problem in AndroidStudio? – NewDeveloper Aug 22 '13 at 15:14

0 Answers0