teslamotors / react-native-camera-kit

A high performance, easy to use, rock solid camera library for React Native apps.
MIT License
2.47k stars 587 forks source link

Build failed #483

Open iesu365 opened 2 years ago

iesu365 commented 2 years ago

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 D:\zs\android\app\src\debug\AndroidManifest.xml Error: uses-sdk:minSdkVersion 21 cannot be smaller than version 23 declared in library [:react-native-camera-kit] D:\zs\node_modules\react-native-camera-kit\android\build\intermediates\merged_manifest\debug\AndroidManifest.xml as the library might be using APIs not available in 21 Suggestion: use a compatible library with a minSdk of at most 21, or increase this project's minSdk version to at least 23, or use tools:overrideLibrary="com.rncamerakit" to force usage (may lead to runtime failures)

FAILURE: Build failed with an exception.

BUILD FAILED in 3s

at makeError (D:\zs\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:174:9)
at D:\zs\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (D:\zs\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (D:\zs\node_modules\@react-native-community\cli\build\index.js:192:9)

info Run CLI with --verbose flag for more details.

SashaGo3 commented 2 years ago

@iesu365 just update android/build.gradle minSdkVersion version from 21 to 23

buildscript {
    ext {
        minSdkVersion = 23
        kotlin_version = '1.5.10'
        ....
    }