In Eclipse , this is how my situation with connected libraries looks like:

enter image description here

enter image description here

How to me correctly translate or connect them in gradle ?

My attempt is as follows:

 apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.3" defaultConfig { applicationId "..." minSdkVersion 15 targetSdkVersion 23 versionCode 32 versionName "3.2.2" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.android.support:appcompat-v7:23.4.0' compile 'com.android.support:design:23.4.0' compile 'com.android.support:cardview-v7:23.4.0' compile 'com.android.support:recyclerview-v7:23.4.0' compile 'com.nineoldandroids:library:2.4.0' compile project(':lvl') compile files('libs/android.jar') compile 'com.google.android.gms:play-services-maps:7.5.0' } 

The error looks like this:

enter image description here

  • Try to remove the "compile files ('libs / android.jar')" and the file itself from the libs folder. - Yuriy SPb
  • Then I will have one of my classes covered with red lines) I need it for JSONParser'a - iFr0z
  • Well, try to document everything in this file ... Maybe then everything will work and the question will be how to connect the parser correctly? .. - Yuriy SPb
  • one
    android.jar definitely has nothing to do in the link libraries - pavlofff
  • @pavlofff Well, in the eclipse, he also found a deal and copes with it with a bang - iFr0z

1 answer 1

I figured out to the end with my problem.

As the respected @pavlofff and @Yuriy SPb android.jar said, it really was superfluous. As soon as I demolished it, errors immediately appeared on HttpParams, HttpClient , etc. Googling, I found a solution for this problem:

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

That's all. The project started without any problems :)