1. jdk, java环境变量
2. File-> Other Setttings-> Default Project Structure-> Android Studio SDK Location
3. File-> Default Setttings-> Build, Execution,Deployment-> Compiler-> Java Compiler-> Project bytecode version(leave blank for JDK default)
4. compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
以上jdk版本必须保持一致!