Answer the question
In order to leave comments, you need to log in
How to determine if a library/dependency is compatible with devices whose SDK version is equal to {minSdkVersion}?
How to determine if a library/dependency is compatible with devices whose SDK version is equal to {minSdkVersion}?
For example, in Java 8 there are things that cannot be used if the minSdkVersion of your Android application is, for example, 16 (Stream API, StandardCharsets class, String.join() method, etc.). For the sake of interest, I tried to make a simple library, connect it to my project and run it on an emulator with API 22 (I was too lazy to download 16). Her code:
import java.util.Arrays;
public final class Library {
private Library() {
}
public static void crash() {
Arrays.stream(new int[]{1, 2, 3}).close();
}
}
java.lang.NoSuchMethodError: No static method stream([I)Ljava/util/stream/IntStream; in class Ljava/util/Arrays; or its super classes (declaration of 'java.util.Arrays' appears in /system/framework/core-libart.jar)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question