Android studio - updated sdk with android 21 , updated java to 1.7.0 . Whenever i try to compile with android L ( 21 ) , it throws this error and gradle sync is failed.
C:\\Users\\me>java -version java version "1.7.0_71" Java(TM) SE Runtime Environment (build 1.7.0_71-b14) Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
found similar question for mac - Android Studio needs JDK 7 for Android-L mac
You have two options, you can just switch your compiled version back to 20 if you do not want all the goodness of SDK 21. To upgrade to JDK 7 for Windows, do this:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.