关闭

compileSdkVersion 'android-24' requires JDK 1.8 or later to compile.

标签: compileSdkVersion
2762人阅读 评论(0) 收藏 举报


报错误   Error:Execution failed for task ':app:compileDebugJavaWithJavac'.> compileSdkVersion 'android-24' requires JDK 1.8 or later to compile.


把版本号统一一下,主要是下面这几个参数的值

    compileSdkVersion 23
    buildToolsVersion "23.0.0"
    targetSdkVersion 23
dependencies {
    compile 'com.android.support:recyclerview-v7:23.1.1'    
   }


apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"
    defaultConfig {
        applicationId "com.example.recycleviewslidingdelydemo"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
            multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile files('libs/nineoldandroids-2.4.0.jar')
    compile 'com.android.support:recyclerview-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'

}


1
0
查看评论

'android-25' requires JDK 1.8 or later to compile

Error:Execution failed for task':app:compileDebugJavaWithJavac'. > compileSdkVersion 'android-25'requires JDK 1.8 or later to comp...
  • cheng_liu_irvine
  • cheng_liu_irvine
  • 2016-10-24 13:51
  • 1609

compileDebugJavaWithJavac.compileSdkVersion 'android-24' requires JDK 1.8 or later to compile.

这个问题经常出现在你导入module 导致的 这是错误是你的版本问题 更改build.gradle 里面的配置 版本号 统一就可以了 是不是很简单
  • csdndouniwan
  • csdndouniwan
  • 2016-07-26 14:13
  • 3564

修改AndroidStudio默认的compileSdkVersion(api26没有源码的问题)

1.android  studio 安装路径  找到目录 D:\Android\java\Android Studio\plugins\android\lib\templates\gradle-projects\NewAndroidModule\root\build.gradle...
  • Saturation
  • Saturation
  • 2017-09-23 11:03
  • 1328

CompileSdkVersion、buildToolVersion、minSdkVersion、targetSdkVersion、maxSdkVersion

参考: http://stackoverflow.com/questions/24521017/android-gradle-buildtoolsversion-vs-compilesdkversion http://blog.csdn.net/zhangjg_blog/article/deta...
  • xx326664162
  • xx326664162
  • 2015-10-22 18:14
  • 2987

修改AndroidStudio默认的compileSdkVersion(纠正了大部分文章的错误)

起因 最近使用AndroidStudio的时候想要修改一下compileSdkVersion,因为现阶段26并没有相应的API sources,所以想看源码的时候就不能看(我丢)。然后就想着能不能修改默认的compileSdkVersion,设置它的compileSdkVersion为25,然...
  • zcl1359205840
  • zcl1359205840
  • 2017-07-27 11:02
  • 1667

compileDebugJavaWithJavac.compileSdkVersion 'android-24' requires JDK 1.8 or later to compile.

  • btt2013
  • btt2013
  • 2016-06-23 23:31
  • 4539

studio 编译报错:compileSdkVersion 'android-24' requires JDK 1.8 or later to compile.

翻译: compileSdkVersion android-24”需要JDK 1.8或更高版本编译。 报错现象如下图: 原因:studio默认选择编译的版本为1.8,而当前jdk环境不是1.8.  解决方法: 1. 在build.gradle中查看编译版本; ...
  • liuyu0915
  • liuyu0915
  • 2016-08-28 17:07
  • 523

compileSdkVersion 'android-24' requires JDK 1.8 or later to compile

http://www.jianshu.com/p/1cc1a20c556b http://www.jianshu.com/p/1cc1a20c556b compileSdkVersion 'android-24' requires JDK 1.8 or l...
  • u011904605
  • u011904605
  • 2017-11-15 09:24
  • 43

解决 Android Nougat requires the IDE to be running with Java 1.8 or later Install a supported JDK

如果转载,请注明出处: 之前接触的Android Studio(AS)最近升级到2.1.3后,出现如下的问题出现: Android Nougat requires the IDE to be running with Java 1.8 or later Install a supported J...
  • ShanYu1198124123
  • ShanYu1198124123
  • 2016-09-02 22:18
  • 2508

解决 Android N requires the IDE to be running with Java 1.8 or later

最近升级了一下IDE,升级到了AS 2.1.1,打开Layout Editor的时候遇到这个问题:Android N requires the IDE to be running with Java 1.8 or laterAS里面我们需要两个JDK:Project JDK & IDE JD...
  • wyzxk888
  • wyzxk888
  • 2016-06-03 12:03
  • 11680
    个人资料
    • 访问:20976次
    • 积分:507
    • 等级:
    • 排名:千里之外
    • 原创:22篇
    • 转载:28篇
    • 译文:4篇
    • 评论:0条
    文章分类