在网上搜索,目前尚不清楚Java 8是否支持Android开发.
在我下载/设置Java 8之前,有人可以在任何"官方"文档中指出我说Java 8是否支持Android开发.
build.gradle 配置\xef\xbc\x9a
\n\napply plugin: \'com.android.application\'\napply plugin: \'realm-android\'\n//apply plugin: \'android-apt\'\n\nandroid {\n compileSdkVersion 25\n buildToolsVersion "25.0.0"\n defaultConfig {\n applicationId "com.way.event"\n minSdkVersion 21\n targetSdkVersion 25\n versionCode 1\n versionName "1.0"\n testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"\n jackOptions {\n enabled true\n }\n }\n compileOptions {\n sourceCompatibility JavaVersion.VERSION_1_8\n targetCompatibility JavaVersion.VERSION_1_8\n }\n buildTypes {\n release {\n minifyEnabled false\n proguardFiles getDefaultProguardFile(\'proguard-android.txt\'), \'proguard-rules.pro\'\n }\n }\n}\n\ndependencies {\n compile fileTree(include: [\'*.jar\'], dir: \'libs\')\n androidTestCompile(\'com.android.support.test.espresso:espresso-core:2.2.2\', {\n exclude group: \'com.android.support\', module: \'support-annotations\'\n })\n compile \'com.android.support:appcompat-v7:25.0.0\'\n compile \'com.android.support:design:25.0.0\'\n compile \'com.android.support:support-v4:25.0.0\'\n testCompile \'junit:junit:4.12\'\n}\nRun Code Online (Sandbox Code Playgroud)\n\n它不支持 Java8\xef\xbc\x9a
\n\n\n …