React-native fails to sign release build - android

Hello i recently got this error while running npx react-native run-android --variant=release --no-jetifier
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:packageRelease'.
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
> com.android.ide.common.signing.KeytoolException: Failed to read key my-key from store "/Users/ad8kunle/Documents/react-native-projects/mvmarket/android/app/my-upload-key.keystore": Integrity check failed: java.security.NoSuchAlgorithmException: Algorithm HmacPBESHA256 not available
It used to work fine, not sure what went wrong. Debug version runs fine.
GRADLE 7.3.3
REACT - NATIVE 8.6.0

Related

How to solve error on releasing app bundle in flutter as given below

I am a Flutter newbie,
I was trying to release the build of an app but I am getting the below error on entering the flutter command "flutter build appbundle" on my mac.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:signReleaseBundle'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Failed to read key upload from store "/Users/drole/Desktop/snackbar/android/app/key.jks": Integrity check failed: java.security.NoSuchAlgorithmException: Algorithm HmacPBESHA256 not available
How to resolve the above error, surfed internet but I don't get a proper solution.

Flutter: Execution failed for task ':background_location:verifyReleaseResources'

My app works fine when I run it or build app packages, but when I try to build apk for release or profile, it gives this message:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':background_location:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
> Android resource linking failed
ERROR:C:\Users\Misha\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\background_location-0.6.1\android\src\main\AndroidManifest.xml:10:9-15:37: AAPT: error: attribute android:foregroundServiceType not found.
I've already tried flutter clean and flutter pub cache repair, as well as updated my Gradle version. Also, I have AndroidX enabled.
Could somebody please help?
Update: I found a solution here

Execution failed for task ':app:processDebugResources'. react-native

There is an error while run project on windows for android. Everything was good but I installed react-natigation and react-native-gesture-handler#~1.0.14 than I started project with react-native run-android command.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Could not read path 'D:\ProjectFolder\android\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\androidx\lifecycle'.
I solved my problem. If somebody need this, remove react-navigation and install #react-navigation/native

Dex error when trying to build ionic Android app

I'm trying to build an ionic app for Android but when I run
ionic cordova run android
I get
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.
> com.android.build.api.transform.TransformException: java.lang.IllegalStateException: Dex archives: setting .DEX extension only for .CLASS files
Trying to run ./gradlew clean gets me
FAILURE: Build failed with an exception.
* What went wrong:
Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory().
> Could not create service of type FileHasher using BuildSessionScopeServices.createFileSnapshotter().
I had the same issue but it was resolved. Thanks to information from #notlose at this link https://github.com/oney/react-native-gcm-android/issues/32
Solution:
just remove both 'build' folder in /android and /android/app
and build again with
'react-native run-android' for react-native
'ionic cordova run android' for ionic

react-native-i18n:processReleaseResources FAILED

I am new to React-Native and I am trying to use the Ignite boilerplate. I followed all the steps for building my first app but now I am stuck with and error and can't find the answer.
As the title says, the error is:
:react-native-i18n:processReleaseResources FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':react-native-i18n:processReleaseResources'.
com.android.ide.common.process.ProcessException: Failed to execute aapt
I am using version 0.50.4 of react-native and version 2.0.1 of react-native-cli, and running on Ubuntu.
Anyone knows what the problem could be?

Categories

Resources