Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug at fresh RN 0.72.5 built #596

Closed
Productivix opened this issue Oct 4, 2023 · 4 comments
Closed

bug at fresh RN 0.72.5 built #596

Productivix opened this issue Oct 4, 2023 · 4 comments

Comments

@Productivix
Copy link

Describe the bug
at "yarn run android" :
you get :
" FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • Where:
    Build file '/home/william/logiciels/logiciels-windows/dev_RN-Node-sauv-GIT/test_rn_scan_camera_tesla/node_modules/react-native-camera-kit/android/build.gradle' line: 2

  • What went wrong:
    A problem occurred evaluating project ':react-native-camera-kit'.

Plugin with id 'kotlin-android' not found.

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':react-native-camera-kit'.

com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle
"

To Reproduce : SIMPLE
Steps to reproduce the behavior:

  1. create a fresh react native (here 0.72.5) project
  2. add this package : "yarn add react-native-camera-kit"
    3.compile : "yarn run android"

Expected behavior
Build successful

Desktop (please complete the following information):

  • OS: [Linux]
  • Version [>5]

Smartphone (please complete the following information):
no matter

@daamsie
Copy link

daamsie commented Oct 10, 2023

You'll probably want to read through the following. It fixed it for me.

https://github.com/teslamotors/react-native-camera-kit/blob/master/docs/kotlin.md

@Productivix
Copy link
Author

I thank you @daamsie , I did not see that.
I applied what is written , and at yarn run android , I had the failure :

`

Configure project :app
Warning: The 'kotlin-android-extensions' Gradle plugin is deprecated. Please use this migration guide (https://goo.gle/kotlin-android-extensions-deprecation) to start working with View Binding (https://developer.android.com/topic/libraries/view-binding) and the 'kotlin-parcelize' plugin.

Task :react-native-camera-kit:processDebugManifest
package="com.rncamerakit" found in source AndroidManifest.xml: /home/william/logiciels/logiciels-windows/dev_RN-Node-GIT/test_rn_scan_camera_tesla/node_modules/react-native-camera-kit/android/src/main/AndroidManifest.xml.
Setting the namespace via a source AndroidManifest.xml's package attribute is deprecated.
Please instead set the namespace (or testNamespace) in the module's build.gradle file, as described here: https://developer.android.com/studio/build/configure-app-module#set-namespace
This migration can be done automatically using the AGP Upgrade Assistant, please refer to https://developer.android.com/studio/build/agp-upgrade-assistant for more information.

Task :app:processDebugMainManifest FAILED

See https://developer.android.com/r/studio-ui/build/manifest-merger for more information about the manifest merger.

20 actionable tasks: 15 executed, 5 up-to-date

info 💡 Tip: Make sure that you have set up your development environment correctly, by running react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor

/home/william/logiciels/logiciels-windows/dev_RN-Node-GIT/test_rn_scan_camera_tesla/android/app/src/debug/AndroidManifest.xml Error:
uses-sdk:minSdkVersion 21 cannot be smaller than version 23 declared in library [:react-native-camera-kit] /home/william/logiciels/logiciels-windows/dev_RN-Node-GIT/test_rn_scan_camera_tesla/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.

  • What went wrong:
    Execution failed for task ':app:processDebugMainManifest'.

Manifest merger failed : uses-sdk:minSdkVersion 21 cannot be smaller than version 23 declared in library [:react-native-camera-kit] /home/william/logiciels/logiciels-windows/dev_RN-Node-GIT/test_rn_scan_camera_tesla/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)

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 28s`

I do not know how to solve that . thank all . I do think my case is very general and not specific .

@daamsie
Copy link

daamsie commented Oct 10, 2023

I had a similar error to that as well, please note the message in the error

Suggestion: use a compatible library with a minSdk of at most 21,
or increase this project's minSdk version to at least 23,

In your build.gradle you will have to bump up your minSdkVersion to at least 23 to be able to use this library.

23 is the equivalent of Android 6 which is pretty darn old already by now.

@Productivix
Copy link
Author

yes indeed , sorry , it works !!
Thank you a lot !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants