LoginSignup
7
7

More than 5 years have passed since last update.

Error:compileSdkVersion android-L requires compiling with JDK 7

Posted at

Android-Lのビルドをしたら、これで怒られました。
いままでJDK6だったので、きにならなかったのですがこれを機に新しいSDKをいれようとおもいました。
だけど、新しいのはJDK8ですよね。
JDK7をいれたらそれで問題ないんだけど、せっかくなのでJDK8をいれました。

すると、JDK7じゃないのでやっぱりエラーがでます。
こういうときは下記のコードを app.gradle にいれれば解決します。

android {
....
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}

7
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
7