WayWay WayWay - 1 year ago 84
Java Question

Can I "use" Java 8 with Android Development now?

I currently have Java 7 JDK installed. It's been like that for awhile. However, recently, my professor is instructing the class to uninstall Java JDK 7 and install Java JDK 8 instead to be able to work on homework and such.

I've been using Java JDK 7 to write and deploy Android apps without any problems so I'm wondering if it's safe to make the upgrade now the JDK 8? I'm assuming that I won't be needing any Java 8 specific methods or functions in my Android development. So if I stay away from that, will my Android development be at all affected?

On a side note, I haven't been able to find any official documentation that states whether or not Java JDK 8 is safe or not or how to make it safe. Either way, I'm going to have to upgrade to Java 8 soon...

Answer Source

If you've been using Java 7 to deploy Android apps then it's certain, up to this point, you haven't used any Java 8 features so I don't see how it would matter.

Follow your instructor's directions and when you do an assignment for school simply select either the JDK or Language Level in the Project Structure.

ctrl+alt+s, select Project

You can default to the Java 8 SDK but limit it to Java 7's features for your Android apps. Or you can simply set your homework projects to the Java 8 SDK.

Going out on a limb here assuming Android Studio includes the core settings of Intellij.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download