Android Studio 3.0: Java 8 Language Features Support



Read more about using desugar in your Android Studio project here:

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…

, , , , , ,

11 thoughts on “Android Studio 3.0: Java 8 Language Features Support

  1. 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)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6123)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757)

Leave a Reply

Your email address will not be published. Required fields are marked *