java - Android Studio : Unsupported major. 次要版本 52.0

标签 java android android-studio build.gradle android-studio-import

我的 friend 给了我一个在 Windows 平台上构建的项目,我有 ubuntu。因此,当我导入项目时出现此错误,

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

如何让我的项目运行。我已经尝试了所有可能的解决方案,但没有任何一种可行。

我已经指出我的 SDK 路径并使用 JDK 1.7.0。使用最新的 Gradle 2.14.1。

这是我的 gradle.build 文件。

    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'
    }

任何解决方案将不胜感激。自从过去 2 天以来我就被困住了。

最佳答案

I have already point my SDK path and using JDK 1.7.0

您需要 JDK 1.8 以及新版本的 Studio 和构建工具。

关于java - Android Studio : Unsupported major. 次要版本 52.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39075493/

相关文章:

java - Play Framework 1 : tag to include javascript file only once

android - 在 Eclipse 中使用 NDK

java - 在 Android Studio 项目中使用 htmlunit 时,没有 Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier 类型的静态字段实例

java - 在 Android Studio 应用程序中创建对象的全局实例

java - 从 Blender 2.8 导出到 LibGDX

java - Jfreechart XYPlot,如何将图例绘制到绘图区?

由于 Google Play 服务 8.3.0,无法从 Play 商店安装 Android 应用

android - 无法将颜色滤镜设置为工具栏中的溢出图标

android - Android Studio 调试器窗口中的数字是什么意思?

java - 一种 "Products"的推荐引擎