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?
Related
I am trying to build React-Native from source on Android.
On running yarn install-android-jsc inside rn-tester package
It gives me this error:
Task :packages:rn-tester:android:app:buildCodegenCLI FAILED
`Execution failed for task
':packages:rn-tester:android:app:buildCodegenCLI'. A problem occurred
starting process 'command 'bash''
Does someone know how to fix this? I do have the pre-requisites installed.
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
GitHub action build failed with the below exception
> Task :app:spotlessKotlinCheck FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:spotlessKotlinCheck'.
The following files had format violations:
app/src/androidTest/java/com/example/androiddevchallenge/ExampleInstrumentedTest.kt
While I running this locally
./gradlew :app:spotlessKotlinCheck
It shows build success.
How to fix this?
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
When trying to build my app
phonegap local build android
I have this issue :
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/xxxxxxxx/Library/Android/sdk/build-tools/23.0.2/aapt'' finished with non-zero exit value 1
I have no idea of how to resolve this, since this problem is mostly encoutered by people developing their app in java.
Thanks in advance for your answers
I had same issue. It turned out to be that I had bad (or missed) some icon/splash-screen images (ie: platforms/android/res/drawable-hdpi etc) and other images.
You can check that runnning './gradlew --debug clean build' from your platforms/android directory. Search in the log for the ':processDebugResources FAILED' string and close to it the file-name that caused the problem. In my case it was 'año nuevo.png' (the 'ñ' caused the issue)
If that doesn't work, have a look at these other SO-questions, they may help too:
ionic build android failure - Execution failed for task processDebugResources
Cordova build android error Execution failed for task ':processDebugResources'
Android Studio build failed at "processDebugResources" when using 9-patch images
PS: Im using latest phonegap (6.3.0) and latest Android Studio (2.1.2)