Published on October 25, 2017 by Android Developers

Read more about using desugar in your Android Studio project here: goo.gl/vxnVh6

With Android Studio 3.0 and the new Android Plugin for Gradle, Android app developers can now use Java 8 language features such as lambdas, method references, and more, in their projects. Thanks to bytecode transformations (a step we call “desugar”), these also work with code using Java 8 language features in third party libraries. Moreover, the translated DEX code runs on all API levels.

Subscribe to the Android Developers channel here: goo.gl/vLYDU

Leave a Reply

51 Comments on "Android Studio 3.0: Java 8 Language Features Support"

Notify of
avatar

Vicky Keshri
Guest
Vicky Keshri
2 months 9 days ago
Hey, for the first time i am using java 8 for build an AR apps. Since, i am new to AR and java 8, here is some error i am getting. I tried very hard to solve it but didn't get anything. Please help..!! java.lang.NoSuchMethodError: No virtual method requireActivity()Landroid/support/v4/app/FragmentActivity; in class Lcom/google/ar/sceneform/ux/BaseArFragment; or its super classes (declaration of 'com.google.ar.sceneform.ux.BaseArFragment' appears in /data/app/incubator.innovatorsbay.com.ar_ex1-1/base.apk) at com.google.ar.sceneform.ux.BaseArFragment.initializeSession(BaseArFragment.java:355) at com.google.ar.sceneform.ux.BaseArFragment.onResume(BaseArFragment.java:335) at android.support.v4.app.Fragment.performResume(Fragment.java:2401) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1465) at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1740) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1809) at android.support.v4.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3217) at android.support.v4.app.FragmentManagerImpl.dispatchResume(FragmentManager.java:3181) at android.support.v4.app.FragmentController.dispatchResume(FragmentController.java:214) at android.support.v4.app.FragmentActivity.onResumeFragments(FragmentActivity.java:470) at android.support.v4.app.FragmentActivity.onPostResume(FragmentActivity.java:459) at android.support.v7.app.AppCompatActivity.onPostResume(AppCompatActivity.java:171) at android.app.Activity.performResume(Activity.java:6800) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3398) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3461) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2730) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1473) at android.os.Handler.dispatchMessage(Handler.java:102)… Read more »
Tiago Romao
Guest
Tiago Romao
6 months 7 days ago

Android Studio is so slow 🙁 you need a supercomputer to run hello world

Miguel Fox
Guest
Miguel Fox
6 months 14 days ago

HiIts possible to download Android Studio to install offline with all SDKS?Thanks

Kaustubh bhagwat
Guest
Kaustubh bhagwat
6 months 13 days ago

Miguel Fox no dude

Vibe
Guest
Vibe
6 months 17 days ago

Thank you

dokuz
Guest
dokuz
9 months 12 days ago

I did that setting but LocalDate lib does not working in my android studio still. Urgent help please

dokuz
Guest
dokuz
9 months 12 days ago

I did that setting but LocalDate lib does not working in my android studio still. Urgent help please

Alexander Wicked
Guest
Alexander Wicked
9 months 17 days ago

"We know developers don't like standing still and want access to the latest and greatest tools they use…"That's why we made Java 8 support right after Java 9 was released…

British Scientist
Guest
British Scientist
9 months 17 days ago

"We know developers don't like standing still and want access to the latest and greatest tools they use…"That's why we made Java 8 support right after Java 9 was released…

Artem Semeniuk
Guest
Artem Semeniuk
9 months 17 days ago

Can I use Java 8 for Android versions lower than 6.0?

Kaustubh bhagwat
Guest
Kaustubh bhagwat
6 months 13 days ago

Totally

Hdt Soft
Guest
Hdt Soft
9 months 10 days ago

Artem Semeniuk Yes

Artem Semeniuk
Guest
Artem Semeniuk
9 months 17 days ago

Can I use Java 8 for Android versions lower than 6.0?

Hdt Soft
Guest
Hdt Soft
9 months 10 days ago

Artem Semeniuk Yes

1 2 3
wpDiscuz