How does sourceCompatibility and targetCompatibility impact number of supported devices?

The android toolchain does some extra steps before the code is run on your device: .java -> .class -> .class (desugared) -> .dex This is described here: https://developer.android.com/studio/write/java8-support The desugaring step is responsible for turning your modern bytecode into something that works on older VMs. How backwards compatible the desugaring makes your code depends on … Read more

Android version check

Well in that case use this // Check if we’re running on Android 5.0 or higher if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { // Call some material design APIs here } else { // Implement this feature without material design } Build.VERSION_CODES.LOLLIPOP = 21

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)