mrousavy / react-native-vision-camera

📸 A powerful, high-performance React Native Camera library.
https://react-native-vision-camera.com
MIT License
6.72k stars 1k forks source link

[V4][Android]🔧 sdk 33 no more supported #2864

Closed francesco-clementi-92 closed 3 weeks ago

francesco-clementi-92 commented 3 weeks ago

How were you trying to build the app?

I upgraded from v3 to v4 and now when I try to run the application the build fail asking to increase the compileSdkVersion to 34. I'm using the feature code scanner

Full build logs

Execution failed for task ':app:checkProdDebugAarMetadata'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
   > 7 issues were found when checking AAR metadata:

       1.  Dependency 'androidx.camera:camera-extensions:1.4.0-alpha04' requires libraries and applications that
           depend on it to compile against version 34 or later of the
           Android APIs.

           :app is currently compiled against android-33.

           Also, the maximum recommended compile SDK version for Android Gradle
           plugin 7.4.2 is 33.

           Recommended action: Update this project's version of the Android Gradle
           plugin to one that supports 34, then update this project to use
           compileSdkVerion of at least 34.

           Note that updating a library or application's compileSdkVersion (which
           allows newer APIs to be used) can be done separately from updating
           targetSdkVersion (which opts the app in to new runtime behavior) and
           minSdkVersion (which determines which devices the app can be installed
           on).

       2.  Dependency 'androidx.camera:camera-video:1.4.0-alpha04' requires libraries and applications that
           depend on it to compile against version 34 or later of the
           Android APIs.

           :app is currently compiled against android-33.

           Also, the maximum recommended compile SDK version for Android Gradle
           plugin 7.4.2 is 33.

           Recommended action: Update this project's version of the Android Gradle
           plugin to one that supports 34, then update this project to use
           compileSdkVerion of at least 34.

           Note that updating a library or application's compileSdkVersion (which
           allows newer APIs to be used) can be done separately from updating
           targetSdkVersion (which opts the app in to new runtime behavior) and
           minSdkVersion (which determines which devices the app can be installed
           on).

       3.  Dependency 'androidx.camera:camera-lifecycle:1.4.0-alpha04' requires libraries and applications that
           depend on it to compile against version 34 or later of the
           Android APIs.

           :app is currently compiled against android-33.

           Also, the maximum recommended compile SDK version for Android Gradle
           plugin 7.4.2 is 33.

           Recommended action: Update this project's version of the Android Gradle
           plugin to one that supports 34, then update this project to use
           compileSdkVerion of at least 34.

           Note that updating a library or application's compileSdkVersion (which
           allows newer APIs to be used) can be done separately from updating
           targetSdkVersion (which opts the app in to new runtime behavior) and
           minSdkVersion (which determines which devices the app can be installed
           on).

       4.  Dependency 'androidx.camera:camera-camera2:1.4.0-alpha04' requires libraries and applications that
           depend on it to compile against version 34 or later of the
           Android APIs.

           :app is currently compiled against android-33.

           Also, the maximum recommended compile SDK version for Android Gradle
           plugin 7.4.2 is 33.

           Recommended action: Update this project's version of the Android Gradle
           plugin to one that supports 34, then update this project to use
           compileSdkVerion of at least 34.

           Note that updating a library or application's compileSdkVersion (which
           allows newer APIs to be used) can be done separately from updating
           targetSdkVersion (which opts the app in to new runtime behavior) and
           minSdkVersion (which determines which devices the app can be installed
           on).

       5.  Dependency 'androidx.camera:camera-core:1.4.0-alpha04' requires libraries and applications that
           depend on it to compile against version 34 or later of the
           Android APIs.

           :app is currently compiled against android-33.

           Also, the maximum recommended compile SDK version for Android Gradle
           plugin 7.4.2 is 33.

           Recommended action: Update this project's version of the Android Gradle
           plugin to one that supports 34, then update this project to use
           compileSdkVerion of at least 34.

           Note that updating a library or application's compileSdkVersion (which
           allows newer APIs to be used) can be done separately from updating
           targetSdkVersion (which opts the app in to new runtime behavior) and
           minSdkVersion (which determines which devices the app can be installed
           on).

       6.  Dependency 'androidx.camera:camera-view:1.4.0-alpha04' requires libraries and applications that
           depend on it to compile against version 34 or later of the
           Android APIs.

           :app is currently compiled against android-33.

           Also, the maximum recommended compile SDK version for Android Gradle
           plugin 7.4.2 is 33.

           Recommended action: Update this project's version of the Android Gradle
           plugin to one that supports 34, then update this project to use
           compileSdkVerion of at least 34.

           Note that updating a library or application's compileSdkVersion (which
           allows newer APIs to be used) can be done separately from updating
           targetSdkVersion (which opts the app in to new runtime behavior) and
           minSdkVersion (which determines which devices the app can be installed
           on).

       7.  Dependency 'androidx.annotation:annotation-experimental:1.4.0' requires libraries and applications that
           depend on it to compile against version 34 or later of the
           Android APIs.

           :app is currently compiled against android-33.

           Also, the maximum recommended compile SDK version for Android Gradle
           plugin 7.4.2 is 33.

           Recommended action: Update this project's version of the Android Gradle
           plugin to one that supports 34, then update this project to use
           compileSdkVerion of at least 34.

           Note that updating a library or application's compileSdkVersion (which
           allows newer APIs to be used) can be done separately from updating
           targetSdkVersion (which opts the app in to new runtime behavior) and
           minSdkVersion (which determines which devices the app can be installed
           on).

Project dependencies

"dependencies": {
    "@invertase/react-native-apple-authentication": "^2.2.2",
    "@react-native-async-storage/async-storage": "^1.19.3",
    "@react-native-firebase/app": "^19.2.2",
    "@react-native-firebase/app-check": "^19.2.2",
    "@react-native-firebase/auth": "^19.2.2",
    "@react-native-firebase/crashlytics": "^19.2.2",
    "@react-native-firebase/firestore": "^19.2.2",
    "@react-native-firebase/functions": "^19.2.2",
    "@react-native-firebase/messaging": "^19.2.2",
    "@react-native-google-signin/google-signin": "^10.1.0",
    "@react-navigation/bottom-tabs": "^6.5.11",
    "@react-navigation/material-top-tabs": "^6.6.5",
    "@react-navigation/native": "^6.1.9",
    "@react-navigation/native-stack": "^6.9.17",
    "dayjs": "^1.11.10",
    "jwt-decode": "^3.1.2",
    "lodash": "^4.17.21",
    "patch": "^0.0.1",
    "react": "18.2.0",
    "react-native": "0.72.14",
    "react-native-bootsplash": "^5.0.4",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-pager-view": "^6.2.2",
    "react-native-paper": "^5.11.1",
    "react-native-safe-area-context": "^4.7.4",
    "react-native-screens": "^3.27.0",
    "react-native-tab-view": "^3.5.2",
    "react-native-vector-icons": "^10.0.1",
    "react-native-vision-camera": "^4.0.3"
  }

VisionCamera Version

4.0.3

Target platforms

Android

Operating system

MacOS

Can you build the VisionCamera Example app?

I didn't try (⚠️ your issue might get ignored & closed if you don't try this)

Additional information

francisco-ss-dev commented 3 weeks ago

same here

mrousavy commented 3 weeks ago

Yea, so set your compileSdk to 34. CameraX needs it, there's no way around it other than to bump it in your build.gradle

amosaxe commented 3 weeks ago

I know the error log is self explanatory but still @mrousavy I will recommend updating https://react-native-vision-camera.com/docs/guides/troubleshooting for removing such confusion.

mrousavy commented 3 weeks ago

ah its outdated in the docs - well if you can shoot over a PR that'd be much appreciated :)