I'm getting the following error while building my app using react-native run-android:
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.2/userguide/command_line_interface.html#sec:command_line_warnings
195 actionable tasks: 2 executed, 193 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
/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/863e0c3c6716935cd3657ad638fd992d/material-1.1.0/res/values/values.xml:528:5-593:11: AAPT: error: style attribute 'android:attr/contextPopupMenuStyle' not found.
/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/863e0c3c6716935cd3657ad638fd992d/material-1.1.0/res/values/values.xml:642:5-699:11: AAPT: error: style attribute 'android:attr/contextPopupMenuStyle' not found.
/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/863e0c3c6716935cd3657ad638fd992d/material-1.1.0/res/values/values.xml:748:5-812:11: AAPT: error: style attribute 'android:attr/contextPopupMenuStyle' not found.
/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/863e0c3c6716935cd3657ad638fd992d/material-1.1.0/res/values/values.xml:909:5-966:11: AAPT: error: style attribute 'android:attr/contextPopupMenuStyle' not found.
/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/863e0c3c6716935cd3657ad638fd992d/material-1.1.0/res/values/values.xml:1023:5-1034:11: AAPT: error: style attribute 'android:attr/dialogCornerRadius' not found.
/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/1cb9b9ea592aa2ea85233be252327dcf/appcompat-1.1.0/res/values-v26/values-v26.xml:5:5-8:13: AAPT: error: resource android:attr/colorError not found.
/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/1cb9b9ea592aa2ea85233be252327dcf/appcompat-1.1.0/res/values-v26/values-v26.xml:9:5-12:13: AAPT: error: resource android:attr/colorError not found.
/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/1cb9b9ea592aa2ea85233be252327dcf/appcompat-1.1.0/res/values-v26/values-v26.xml:13:5-16:13: AAPT: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/1cb9b9ea592aa2ea85233be252327dcf/appcompat-1.1.0/res/values-v28/values-v28.xml:5:5-8:13: AAPT: error: resource android:attr/dialogCornerRadius not found.
/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/1cb9b9ea592aa2ea85233be252327dcf/appcompat-1.1.0/res/values-v28/values-v28.xml:9:5-12:13: AAPT: error: resource android:attr/dialogCornerRadius not found.
/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/1cb9b9ea592aa2ea85233be252327dcf/appcompat-1.1.0/res/values-v23/values-v23.xml:38:5-41:13: AAPT: error: style attribute 'android:attr/hyphenationFrequency' not found.
/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/1cb9b9ea592aa2ea85233be252327dcf/appcompat-1.1.0/res/values-v23/values-v23.xml:38:5-41:13: AAPT: error: style attribute 'android:attr/breakStrategy' not found.
/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/1cb9b9ea592aa2ea85233be252327dcf/appcompat-1.1.0/res/values-v23/values-v23.xml:45:5-48:13: AAPT: error: style attribute 'android:attr/hyphenationFrequency' not found.
/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/1cb9b9ea592aa2ea85233be252327dcf/appcompat-1.1.0/res/values-v23/values-v23.xml:45:5-48:13: AAPT: error: style attribute 'android:attr/breakStrategy' not found.
/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/7ce8a2eb9e81825ec9bcc373c597a746/cardview-1.0.0/res/values-v23/values-v23.xml:3:5-5:13: AAPT: error: resource android:attr/colorBackgroundFloating not found.
/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/863e0c3c6716935cd3657ad638fd992d/material-1.1.0/res/values/values.xml:1709:5-1716:11: AAPT: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 5s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
How to fix this error?
It turns out that I had to bump my compileSdkVersion in a module (LVL licensing). Very annoying since the error was manifesting under a completely different module.
Related
I'm currently upgrading cordova (and its platforms) in an existing project.
After upgrading from cordova-android from 9.x to 11.x I get some build errors:
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
C:\Users\OBurger\.gradle\caches\transforms-3\5c55b34766402f38a5e46b43ac71f280\transformed\jetified-core-splashscreen-1.0.0\res\values-v31\values-v31.xml:3:5-9:13: AAPT: error: style attribute 'android:attr/windowSplashScreenAnimatedIcon' not found.
C:\Users\OBurger\.gradle\caches\transforms-3\5c55b34766402f38a5e46b43ac71f280\transformed\jetified-core-splashscreen-1.0.0\res\values-v31\values-v31.xml:3:5-9:13: AAPT: error: style attribute 'android:attr/windowSplashScreenBackground' not found.
C:\Users\OBurger\.gradle\caches\transforms-3\5c55b34766402f38a5e46b43ac71f280\transformed\jetified-core-splashscreen-1.0.0\res\values-v31\values-v31.xml:3:5-9:13: AAPT: error: style attribute 'android:attr/windowSplashScreenAnimationDuration' not found.
C:\Users\OBurger\.gradle\caches\transforms-3\5c55b34766402f38a5e46b43ac71f280\transformed\jetified-core-splashscreen-1.0.0\res\values-v31\values-v31.xml:10:5-14:13: AAPT: error: style attribute 'android:attr/windowSplashScreenIconBackgroundColor' not found.
C:\Users\OBurger\.gradle\caches\transforms-3\4e55571a2aca20a3df79838283759989\transformed\core-1.7.0\res\values\values.xml:105:5-114:25: AAPT: error: resource android:attr/lStar not found.
I already followed the steps for the cordova-android upgrade described here: https://ionic.zendesk.com/hc/en-us/articles/7891143965975-Migrating-to-Cordova-Android-11
I also added a dependency for "androidx.core:core-splashscreen:1.0.0" in build.gradle
When I run expo run:android my app crashed with the error:
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
/Users/joel/Developer/dnp/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:7014: AAPT: error: duplicate value for resource 'attr/show_buffering' with config ''.
/Users/joel/Developer/dnp/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:7014: AAPT: error: resource previously defined here.
/Users/joel/Developer/dnp/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml: AAPT: error: file failed to compile.
The iOS build works (expo run:ios).
I have tried to change minSdkVersion in my build.gradle and i've changed similar values in that file to try and fix it, with no success.
I am running:
react-native#0.64.3
expo#44.0.6
Sorry for my bad English. I'm trying to build an APK 2-nd day and haven't results. Every time after fixing some error I'm getting a new problem.
Now I'm trying to launch my application on Android device and getting an errors:
Launching lib\main.dart on Smartphone in debug mode...
Running Gradle task 'assembleDebug'...
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
C:\Users\User\.gradle\caches\transforms-2\files-2.1\2e94107f30f39be366a17347c2bf100b\core-1.1.0\res\values\values.xml:142:5-173:25: AAPT: error: resource android:attr/fontStyle not found.
C:\Users\User\.gradle\caches\transforms-2\files-2.1\2e94107f30f39be366a17347c2bf100b\core-1.1.0\res\values\values.xml:142:5-173:25: AAPT: error: resource android:attr/font not found.
C:\Users\User\.gradle\caches\transforms-2\files-2.1\2e94107f30f39be366a17347c2bf100b\core-1.1.0\res\values\values.xml:142:5-173:25: AAPT: error: resource android:attr/fontWeight not found.
C:\Users\User\.gradle\caches\transforms-2\files-2.1\2e94107f30f39be366a17347c2bf100b\core-1.1.0\res\values\values.xml:142:5-173:25: AAPT: error: resource android:attr/fontVariationSettings not found.
C:\Users\User\.gradle\caches\transforms-2\files-2.1\2e94107f30f39be366a17347c2bf100b\core-1.1.0\res\values\values.xml:142:5-173:25: AAPT: error: resource android:attr/ttcIndex not found.
C:\Users\User\.gradle\caches\transforms-2\files-2.1\2e94107f30f39be366a17347c2bf100b\core-1.1.0\res\values\values.xml:174:5-210:25: AAPT: error: resource android:attr/startX not found.
C:\Users\User\.gradle\caches\transforms-2\files-2.1\2e94107f30f39be366a17347c2bf100b\core-1.1.0\res\values\values.xml:174:5-210:25: AAPT: error: resource android:attr/startY not found.
C:\Users\User\.gradle\caches\transforms-2\files-2.1\2e94107f30f39be366a17347c2bf100b\core-1.1.0\res\values\values.xml:174:5-210:25: AAPT: error: resource android:attr/endX not found.
C:\Users\User\.gradle\caches\transforms-2\files-2.1\2e94107f30f39be366a17347c2bf100b\core-1.1.0\res\values\values.xml:174:5-210:25: AAPT: error: resource android:attr/endY not found.
C:\Users\User\.gradle\caches\transforms-2\files-2.1\2e94107f30f39be366a17347c2bf100b\core-1.1.0\res\values\values.xml:211:5-217:25: AAPT: error: resource android:attr/offset not found.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 31s
Exception: Gradle task assembleDebug failed with exit code 1
What's problem? Thanks.
I am building a React-Native mobile app through AppCenter and the Android version is failing in one of the last build steps:
> Task :app:processReleaseResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processReleaseResources'.
> Android resource linking failed
/Users/runner/runners/2.166.3/work/1/s/android/app/build/intermediates/merged_manifests/release/AndroidManifest.xml:14: AAPT: error: resource mipmap/ic_launcher (aka org.***.mobile:mipmap/ic_launcher) not found.
/Users/runner/runners/2.166.3/work/1/s/android/app/build/intermediates/merged_manifests/release/AndroidManifest.xml:14: AAPT: error: resource string/app_name (aka org.***.mobile:string/app_name) not found.
/Users/runner/runners/2.166.3/work/1/s/android/app/build/intermediates/merged_manifests/release/AndroidManifest.xml:14: AAPT: error: resource mipmap/ic_launcher_round (aka org.***.mobile:mipmap/ic_launcher_round) not found.
/Users/runner/runners/2.166.3/work/1/s/android/app/build/intermediates/merged_manifests/release/AndroidManifest.xml:14: AAPT: error: resource style/AppTheme (aka org.***.mobile:style/AppTheme) not found.
/Users/runner/runners/2.166.3/work/1/s/android/app/build/intermediates/merged_manifests/release/AndroidManifest.xml:22: AAPT: error: resource string/app_name (aka org.***.mobile:string/app_name) not found.
error: failed processing manifest.
It is almost like it cannot find the files found in the Android res directory such as strings.xml
Am I missing some setting in the app/build.gradle file that is causing the build process to fail in this fashion?
Check your android manifest file, there I think you have deleted the mipmap icon, check if all ic_launcher, apptheme all are their in res folder.
everybody.
I have some issues with build apk as release method in flutter.
I don't really know why this has error.
This refers https://github.com/rxlabz/speech_recognition/tree/master/example
During building as release method, issues are following.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':speech_recognition:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
/Users/kk/.gradle/caches/transforms-2/files-2.1/0a271e99b6771ad4a84318244d532fb7/core-1.0.0/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/fontStyle not found.
/Users/kk/.gradle/caches/transforms-2/files-2.1/0a271e99b6771ad4a84318244d532fb7/core-1.0.0/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/font not found.
/Users/kk/.gradle/caches/transforms-2/files-2.1/0a271e99b6771ad4a84318244d532fb7/core-1.0.0/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/fontWeight not found.
/Users/kk/.gradle/caches/transforms-2/files-2.1/0a271e99b6771ad4a84318244d532fb7/core-1.0.0/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/fontVariationSettings not found.
/Users/kk/.gradle/caches/transforms-2/files-2.1/0a271e99b6771ad4a84318244d532fb7/core-1.0.0/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/ttcIndex not found.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 3m 45s
I know, the answer might be too late, but anyway, this is annoying issue - I've got the same problem now and spent couple of hours fighting it.
Finally the workaround was to manually change in the build.gradle in the Android folder of the lib the "compileSdkVersion" property from 25 to 28, after that I managed to compile the project.