[Announcement] minCompileSdk version has been updated to 31

1,265 views
Skip to first unread message

Julie Wu

unread,
Nov 1, 2021, 10:47:31 PM11/1/21
to camerax-d...@android.com

Dear developers,


After you upgrade to the latest CameraX releases (1.0.0-alpha30 or better), you will need to use the stable SDK 31 (or better) to compile your application; otherwise you may experience an error like this:


The minCompileSdk (31) specified in a

 dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)

 is greater than this module's compileSdkVersion (android-30).

 Dependency: androidx.camera:camera-view:1.0.0-alpha30.

 AAR metadata file: /Users/runner/.gradle/caches/transforms-3/9e0b2d3125d860e065b0cfb70373c70f/transformed/camera-view-1.0.0-alpha30/META-INF/com/android/build/gradle/aar-metadata.properties.


To fix it, simply change your compileSdkVersion to 31. The requirement does not affect your minSdkVersion or targetSdkVersion settings. This is because AndroidX enforces the minCompileSdk metadata flag: after the latest SDK for an Android version is finalized, AndroidX updates the minCompileSdk to that SDK version. We will also add this in the release note to ensure it is well communicated in the future.


Thank you for continuously supporting CameraX!


Julie on behalf of CameraX development team

Reply all
Reply to author
Forward
0 new messages