Open
Description
I got the lintDebug errors when executing the ./gradlew clean build for the Android app.
react-native-view-shot: 4.0.3
react-native version: 0.78.2
gradle version: 8.12
For now, I skip the lint for this library but it's helpful to fix these errors.
Thank you for your support.
This is the result.
**/node_modules/react-native-view-shot/android/build.gradle:59: Warning: Avoid using + in version numbers; can lead to unpredictable and unrepeatable builds (com.facebook.react:react-native:+) [GradleDynamicVersion]
implementation 'com.facebook.react:react-native:+'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Explanation for issues of type "GradleDynamicVersion":
Using + in dependencies lets you automatically pick up the latest available
version rather than a specific, named version. However, this is not
recommended; your builds are not repeatable; you may have tested with a
slightly different version than what the build server used. (Using a
dynamic version as the major version number is more problematic than using
it in the minor version position.)
**/node_modules/react-native-view-shot/android/src/main/java/fr/greweb/reactnativeviewshot/ViewShot.java:61: Error: This declaration is opt-in and its usage should be marked with @com.facebook.react.common.annotations.UnstableReactNativeAPI or @OptIn(markerClass = com.facebook.react.common.annotations.UnstableReactNativeAPI.class) [UnsafeOptInUsageError from androidx.annotation.experimental]
public class ViewShot implements UIBlock, com.facebook.react.fabric.interop.UIBlock {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**/node_modules/react-native-view-shot/android/src/main/java/fr/greweb/reactnativeviewshot/ViewShot.java:191: Error: This declaration is opt-in and its usage should be marked with @com.facebook.react.common.annotations.UnstableReactNativeAPI or @OptIn(markerClass = com.facebook.react.common.annotations.UnstableReactNativeAPI.class) [UnsafeOptInUsageError from androidx.annotation.experimental]
public void execute(@NonNull UIBlockViewResolver uiBlockViewResolver) {
~~~~~~~
**/node_modules/react-native-view-shot/android/src/main/java/fr/greweb/reactnativeviewshot/ViewShot.java:191: Error: This declaration is opt-in and its usage should be marked with @com.facebook.react.common.annotations.UnstableReactNativeAPI or @OptIn(markerClass = com.facebook.react.common.annotations.UnstableReactNativeAPI.class) [UnsafeOptInUsageError from androidx.annotation.experimental]
public void execute(@NonNull UIBlockViewResolver uiBlockViewResolver) {
~~~~~~~~~~~~~~~~~~~
**/node_modules/react-native-view-shot/android/src/main/java/fr/greweb/reactnativeviewshot/ViewShot.java:197: Error: This declaration is opt-in and its usage should be marked with @com.facebook.react.common.annotations.UnstableReactNativeAPI or @OptIn(markerClass = com.facebook.react.common.annotations.UnstableReactNativeAPI.class) [UnsafeOptInUsageError from androidx.annotation.experimental]
private void executeImpl(final NativeViewHierarchyManager nativeViewHierarchyManager, final UIBlockViewResolver uiBlockViewResolver) {
~~~~~~~~~~~~~~~~~~~
**/node_modules/react-native-view-shot/android/src/main/java/fr/greweb/reactnativeviewshot/ViewShot.java:207: Error: This declaration is opt-in and its usage should be marked with @com.facebook.react.common.annotations.UnstableReactNativeAPI or @OptIn(markerClass = com.facebook.react.common.annotations.UnstableReactNativeAPI.class) [UnsafeOptInUsageError from androidx.annotation.experimental]
view = uiBlockViewResolver.resolveView(tag);
~~~~
**/node_modules/react-native-view-shot/android/src/main/java/fr/greweb/reactnativeviewshot/ViewShot.java:207: Error: This declaration is opt-in and its usage should be marked with @com.facebook.react.common.annotations.UnstableReactNativeAPI or @OptIn(markerClass = com.facebook.react.common.annotations.UnstableReactNativeAPI.class) [UnsafeOptInUsageError from androidx.annotation.experimental]
view = uiBlockViewResolver.resolveView(tag);
~~~~~~~~~~~
Explanation for issues of type "UnsafeOptInUsageError":
This API has been flagged as opt-in with error-level severity.
Any declaration annotated with this marker is considered part of an
unstable or
otherwise non-standard API surface and its call sites should accept the
opt-in
aspect of it by using the @OptIn annotation, using the marker annotation
--
effectively causing further propagation of the opt-in aspect -- or
configuring
the UnsafeOptInUsageError check's options for project-wide opt-in.
To configure project-wide opt-in, specify the opt-in option value in
lint.xml
as a comma-delimited list of opted-in annotations:
<lint>
<issue id="UnsafeOptInUsageError">
<option name="opt-in" value="com.foo.ExperimentalBarAnnotation" />
</issue>
</lint>
Vendor: Android Open Source Project
Identifier: androidx.annotation.experimental
Feedback: https://issuetracker.google.com/issues/new?component=459778
**/node_modules/react-native-view-shot/android/src/main/java/fr/greweb/reactnativeviewshot/ViewShot.java:412: Warning: Unnecessary; SDK_INT is always >= 24 [ObsoleteSdkInt]
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Explanation for issues of type "ObsoleteSdkInt":
This check flags version checks that are not necessary, because the
minSdkVersion (or surrounding known API level) is already at least as high
as the version checked for.
Similarly, it also looks for resources in -vNN folders, such as values-v14
where the version qualifier is less than or equal to the minSdkVersion,
where the contents should be merged into the best folder.
6 errors, 2 warnings
Metadata
Metadata
Assignees
Labels
No labels