2017-03-02 7 views
-2

Mein Projekt hat Kompilierungsfehler im Zusammenhang mit org.apache.http Bibliotheken, wie in diesem image gezeigt. Das Projekt wird die Erstellung mit api 25.org.apache.http Kompilierungsfehler

Meine build.gradle Datei:

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 25 
    buildToolsVersion "25.0.2" 

    defaultConfig { 
     applicationId "com.seffalabdelaziz.crazyman" 
     minSdkVersion 11 
     targetSdkVersion 25 
     compileOptions { 
      sourceCompatibility JavaVersion.VERSION_1_5 
      targetCompatibility JavaVersion.VERSION_1_5 
     } 
    } 

    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' 
     } 
    } 
} 
+2

richtige Titel Geben Sie Ihnen zu helfen, besser – Noorul

Antwort

0

Versuchen Sie,

android { 
    useLibrary 'org.apache.http.legacy' 
} 

So endlich sein werden

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 25 
    buildToolsVersion "25.0.2" 
    useLibrary 'org.apache.http.legacy' 

    defaultConfig { 
     applicationId "com.seffalabdelaziz.crazyman" 
     minSdkVersion 11 
     targetSdkVersion 25 
     compileOptions { 
      sourceCompatibility JavaVersion.VERSION_1_7 
      targetCompatibility JavaVersion.VERSION_1_7 
     } 
    } 

    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' 
     } 
    } 
}