Android application with camera2 library crash on start for SDK19
问题 I use androidx.camera.camera2 library in my application. This library for SDK 21 and greater. But i want allow users start application for SDK 19 without camera2 support. I check SDK version in my code, but application crash on start. Can i exclude camera2 from dependencies for old SDK? 05-30 12:13:42.318 2000-2000/com.myapp.android E/AndroidRuntime: FATAL EXCEPTION: main Process: com.myapp.android, PID: 2000 java.lang.NoClassDefFoundError: android.util.Size at androidx.camera.camera2.impl