Search code examples
javaandroidandroid-studiobuild.gradleandroid-studio-import

Android Studio : Unsupported major.minor version 52.0


My friend Gave me a project which was built in Windows platform and I have ubuntu. So when I import the project I am getting this error,

Error:(1, 0) Cause: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0

How can get my project running. I have tried all the possible solutions but didn't work any one of them.

I have already point my SDK path and using JDK 1.7.0. Using Gradle 2.14.1 which is latest one.

Here is my gradle.build file.

    apply plugin: 'com.android.application'

    android {
        compileSdkVersion 23
        buildToolsVersion "23.0.1"
        useLibrary 'org.apache.http.legacy'

        defaultConfig {
            applicationId "com.example.lenovo.myapp"
            minSdkVersion 19
            targetSdkVersion 23
            versionCode 1
            versionName "1.0"
            multiDexEnabled true
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
        packagingOptions {
            exclude 'META-INF/DEPENDENCIES'
            exclude 'META-INF/NOTICE'
            exclude 'META-INF/LICENSE'
            exclude 'META-INF/LICENSE.txt'
            exclude 'META-INF/NOTICE.txt'
        }
    }

    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile 'com.google.api-client:google-' +
                'api-client-gson:+'
        compile 'com.android.support:appcompat-v7:23.4.0'
        compile 'com.android.support:design:23.4.0'
        compile 'com.google.http-client:google-http-client-android:+'
        compile 'com.google.api-client:google-api-client-android:+'
        compile 'com.google.code.gson:gson:2.2.4'
        compile 'org.apache.httpcomponents:httpclient:4.5'
        compile 'com.google.android.gms:play-services-identity:9.2.1'
        compile 'com.google.android.gms:play-services-plus:9.2.1'
        compile 'com.google.android.gms:play-services-gcm:9.2.1'
        compile 'com.mcxiaoke.volley:library-aar:1.0.0'
        compile 'org.apache.httpcomponents:httpcore:4.4.1'
        compile 'org.apache.httpcomponents:httpmime:4.3.6'
        compile 'com.squareup.retrofit2:retrofit:2.1.0'
        compile 'com.squareup.okhttp:okhttp:2.3.0'
        compile 'com.squareup.retrofit2:converter-gson:2.1.0'
        compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha5'
        compile 'com.github.bumptech.glide:glide:3.6.0'
        compile 'com.jakewharton:butterknife:6.1.0'
        compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.1.3'
        testCompile 'junit:junit:4.12'
    }

Any solution would be appreciated. I am stuck since last 2 days.


Solution

  • I have already point my SDK path and using JDK 1.7.0

    You need JDK 1.8 with the new version of Studio and the build tools.