Error inflating class androidx.constraintlayout.widget.ConstraintLayout on Android 5.0 and Android 6.0

Running my app on a Pixel XL API 21, I get the below error. E/AndroidRuntime: FATAL EXCEPTION: main Process: com.samprojects.sickvibes, PID: 4322 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.samprojects.sickvibes/com.samprojects.sickvibes.SplashActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class androidx.constraintlayout.widget.ConstraintLayout at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360) at android.app.ActivityThread.access$800(ActivityThread.java:144) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5221) at java.lang.reflect.Method.invoke(Native Method)…

Details

In Java why is Function.identity() a static method instead of something else?

Java 8 added functional programming constructs, including the Function class and its associated identity() method. Here’s the current structure of this method: // Current implementation of this function in the [JDK source][1] static <T> Function<T, T> identity() { return t -> t; } // Can be used like this List<T> sameList = list.stream().map(Function.identity()).collect(Collectors.toList()); However, there’s…

Details