error to assembleRelease my react native app after change windows - react-native

Task :app:checkReleaseAarMetadata FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:checkReleaseAarMetadata'.
Could not resolve all files for configuration ':app:releaseRuntimeClasspath'.
Failed to transform appcompat-1.2.0.aar (androidx.appcompat:appcompat:1.2.0) to match attributes {artifactType=android-aar-metadata, org.gradle.status=release}.
> Could not find appcompat-1.2.0.aar (androidx.appcompat:appcompat:1.2.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.2.0/appcompat-1.2.0.aar

Related

Task :app:createBundleReleaseJsAndAssets FAILED

I am getting this error which I try to create singed apk in react native
"info Done writing bundle output
info Done writing sourcemap output
info Copying 1 asset files
info Done copying assets
'E:\React' is not recognized as an internal or external command,
operable program or batch file.
enter image description here
Task :app:createBundleReleaseJsAndAssets FAILED
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
What went wrong:
Execution failed for task ':app:createBundleReleaseJsAndAssets'.
Process 'command 'cmd'' finished with non-zero exit value 1
"
It will be great if anyone can tell the solution for it?

Codemagic: build failed for task ':app:signReleaseBundle' with 'Algorithm HmacPBESHA256 not available'

When I try to build Flutter app for Android release, I get the following error:
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 androiddebugkey from store "/Users/builder/.android/debug.keystore": Integrity check failed: java.security.NoSuchAlgorithmException: Algorithm HmacPBESHA256 not available

./gradle bundlerelease not generating aab

I was trying to build an app via ./gradle bundlerelease
got an error everytime:
C:\Users\xxx\Desktop\app\node_modules\#react-native-firebase\app\android\src\reactnative\java\io\invertase\firebase\app\ReactNativeFirebaseAppInitProvider.java:25: error: cannot find symbol
BuildConfig.APPLICATION_ID + ".reactnativefirebaseappinitprovider";
^
symbol: variable APPLICATION_ID
location: class BuildConfig
1 error
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':react-native-firebase_app:compileReleaseJavaWithJavac'.
Compilation failed; see the compiler error output for details.
Downgrad the gradle to 3.6.0 (in build.gradle) and rebuild the project.
classpath('com.android.tools.build:gradle:3.6.0')

Why when I want to run an Android yarn error like this?

Why when I want to run an Android yarn error like this?
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
> Task :app:processDebugResources FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.0.1/userguide/command_line_interface.html#sec:command_line_warnings
10 actionable tasks: 2 executed, 8 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
D:\xampp\htdocs\konspirasiSnack\android\app\src\main\AndroidManifest.xml:6:5-25:19: AAPT: error: resource m
ipmap/ic_launcher (aka com.konspirasisnack:mipmap/ic_launcher) not found.
D:\xampp\htdocs\konspirasiSnack\android\app\src\main\AndroidManifest.xml:6:5-25:19: AAPT: error: resource s
tring/app_name (aka com.konspirasisnack:string/app_name) not found.
D:\xampp\htdocs\konspirasiSnack\android\app\src\main\AndroidManifest.xml:6:5-25:19: AAPT: error: resource m
ipmap/ic_launcher_round (aka com.konspirasisnack:mipmap/ic_launcher_round) not found.
D:\xampp\htdocs\konspirasiSnack\android\app\src\main\AndroidManifest.xml:6:5-25:19: AAPT: error: resource s
tyle/AppTheme (aka com.konspirasisnack:style/AppTheme) not found.
D:\xampp\htdocs\konspirasiSnack\android\app\src\main\AndroidManifest.xml:13:7-23:18: AAPT: error: resource
string/app_name (aka com.konspirasisnack:string/app_name) not found.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. R
un with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 35s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnat
ive.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
react native versi 0.62.2
distributionUrl=https://services.gradle.org/distributions/gradle-6.0.1-all.zip
os windows 10
java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)
ANDROID_HOME = C:\Users\user\AppData\Local\Android\Sdk
JAVA_HOME = C:\Program Files\Java\jdk

react native react-native-mauron85-background-geolocation:processReleaseResources FAILED

Everything was working fine then suddenly I'm getting following error
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:font
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontStyle
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontVariationSettings
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontWeight
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:ttcIndex
:react-native-mauron85-background-geolocation:processReleaseResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-mauron85-background-geolocation:processReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 23.413 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
I managed to fix this by changing one line in node_modules/react-native-mauron85-background-geolocation/android/lib/build.gradle
from
compile 'com.android.support:support-v4:+'
to
compile 'com.android.support:support-v4:23.+'