bamlab / react-native-image-resizer

🗻 Resize local images with React Native
MIT License
1.61k stars 347 forks source link

Release mode build fails on Android. #349

Closed seungyoubkim closed 1 year ago

seungyoubkim commented 1 year ago

Hello, I am using this module very useful.

However, this error occurs when building in release mode.

> Task :bam.tech_react-native-image-resizer:generateReleaseRFile FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':bam.tech_react-native-image-resizer:generateReleaseRFile'.
> Could not resolve all files for configuration ':bam.tech_react-native-image-resizer:releaseCompileClasspath'.
   > Failed to transform react-native-0.71.0-rc.0-release.aar (com.facebook.react:react-native:0.71.0-rc.0) to match attributes {artifactType=android-symbol-with-package-name, com.android.build.api.attributes.BuildTypeAttr=release, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-api}.
      > Could not find react-native-0.71.0-rc.0-release.aar (com.facebook.react:react-native:0.71.0-rc.0).
        Searched in the following locations:
            https://repo.maven.apache.org/maven2/com/facebook/react/react-native/0.71.0-rc.0/react-native-0.71.0-rc.0-release.aar

Can you tell me the solution?

It works very well when building in debug mode.

Version of react-native-image-resizer - 3.0.4, Version of react-native - 0.69.4.

FerMoreno17 commented 1 year ago

Hello. Let me add some new lines at @seungyoubkim issue. I´m faced with:

Task :bam.tech_react-native-image-resizer:processReleaseManifest package="com.reactnativeimageresizer" found in source AndroidManifest.xml: /Users/macdev00g2/Desktop/...s/@bam.tech/react-native-image-resizer/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.

Bakeralnabulsi commented 1 year ago

Same problem here,

works fine in debug but fails on release

Version of react-native-image-resizer - 3.0.4, Version of react-native - 0.68.2

Bakeralnabulsi commented 1 year ago

Hey guys, just found this link, i updated react-native version to 0.68.5 and its working fine

robingullo commented 1 year ago

It was a general issue for all React Native versions < 0.63. It was patched in newer versions of React Native, closing this issue.