My react native project won't build I get the error below.
I have recently changed the package name of my app, it runs fine using react-native run-android. However when I build my apk using ./gradlew assembleRelease. I get the error. Any ideas?
What went wrong:
Execution failed for task ':react-native-youtube:verifyReleaseResources'.
1 exception was raised by workers:
com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found.
error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found.
C:\Users\Matt\sites\tcapp\node_modules\react-native-youtube\android\build\intermediates\res\merged\release\values-v26\values-v26.xml:7: error: resource android:attr/colorError not found.
C:\Users\Matt\sites\tcapp\node_modules\react-native-youtube\android\build\intermediates\res\merged\release\values-v26\values-v26.xml:11: error: resource android:attr/colorError not found.
C:\Users\Matt\sites\tcapp\node_modules\react-native-youtube\android\build\intermediates\res\merged\release\values-v26\values-v26.xml:15: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
C:\Users\Matt\sites\tcapp\node_modules\react-native-youtube\android\build\intermediates\res\merged\release\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
C:\Users\Matt\sites\tcapp\node_modules\react-native-youtube\android\build\intermediates\res\merged\release\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
C:\Users\Matt\sites\tcapp\node_modules\react-native-youtube\android\build\intermediates\res\merged\release\values\values.xml:2711: error: resource android:attr/fontStyle not found.
C:\Users\Matt\sites\tcapp\node_modules\react-native-youtube\android\build\intermediates\res\merged\release\values\values.xml:2712: error: resource android:attr/font not found.
C:\Users\Matt\sites\tcapp\node_modules\react-native-youtube\android\build\intermediates\res\merged\release\values\values.xml:2713: error: resource android:attr/fontWeight not found.
C:\Users\Matt\sites\tcapp\node_modules\react-native-youtube\android\build\intermediates\res\merged\release\values\values.xml:2714: error: resource android:attr/fontVariationSettings not found.
C:\Users\Matt\sites\tcapp\node_modules\react-native-youtube\android\build\intermediates\res\merged\release\values\values.xml:2715: error: resource android:attr/ttcIndex not found.
C:\Users\Matt\sites\tcapp\node_modules\react-native-youtube\android\build\intermediates\res\merged\release\values\values.xml:2796: error: resource android:attr/startX not found.
C:\Users\Matt\sites\tcapp\node_modules\react-native-youtube\android\build\intermediates\res\merged\release\values\values.xml:2799: error: resource android:attr/startY not found.
C:\Users\Matt\sites\tcapp\node_modules\react-native-youtube\android\build\intermediates\res\merged\release\values\values.xml:2802: error: resource android:attr/endX not found.
C:\Users\Matt\sites\tcapp\node_modules\react-native-youtube\android\build\intermediates\res\merged\release\values\values.xml:2805: error: resource android:attr/endY not found.
C:\Users\Matt\sites\tcapp\node_modules\react-native-youtube\android\build\intermediates\res\merged\release\values\values.xml:2813: error: resource android:attr/offset not found.
error: failed linking references.
Related
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'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.
I'm trying to develop an app with android studio 4.1.1 and it has almost done but there is an error in the value.xml file from appcompat 1.2.0 and material 1.2.1.
after i hit the build project to device these errors shows up in the log.
Here is some info about my config:
compile sdk version : 30
min sdk version : 21
buildToolsVersion : 30.0.2
ndkVersion : 21.0.6113669
Error codes:
C:\Users\**\.gradle\caches\transforms-2\files-2.1\a0e1355bd10f51465d015cd38c7b32cb\material-1.2.1\res\values\values.xml:2539:5-2577:23: AAPT: error: duplicate value for resource 'attr/layout_scrollFlags' with config ''.
C:\Users\**\.gradle\caches\transforms-2\files-2.1\a0e1355bd10f51465d015cd38c7b32cb\material-1.2.1\res\values\values.xml:2539:5-2577:23: AAPT: error: resource previously defined here.
C:\Users\**\.gradle\caches\transforms-2\files-2.1\a0e1355bd10f51465d015cd38c7b32cb\material-1.2.1\res\values\values.xml:2578:5-2597:23: AAPT: error: duplicate value for resource 'attr/badgeGravity' with config ''.
C:\Users\**\.gradle\caches\transforms-2\files-2.1\a0e1355bd10f51465d015cd38c7b32cb\material-1.2.1\res\values\values.xml:2578:5-2597:23: AAPT: error: resource previously defined here.
C:\Users\**\.gradle\caches\transforms-2\files-2.1\a0e1355bd10f51465d015cd38c7b32cb\material-1.2.1\res\values\values.xml:2598:5-2631:23: AAPT: error: duplicate value for resource 'attr/fabAlignmentMode' with config ''.
C:\Users\**\.gradle\caches\transforms-2\files-2.1\a0e1355bd10f51465d015cd38c7b32cb\material-1.2.1\res\values\values.xml:2598:5-2631:23: AAPT: error: resource previously defined here.
and :
C:\Users\**\.gradle\caches\transforms-2\files-2.1\3a673510e337bf69bd102ca32d6fbb05\appcompat-1.2.0\res\values\values.xml:1692:5-1774:25: AAPT: error: duplicate value for resource 'attr/navigationMode' with config ''.
C:\Users\**\.gradle\caches\transforms-2\files-2.1\3a673510e337bf69bd102ca32d6fbb05\appcompat-1.2.0\res\values\values.xml:1692:5-1774:25: AAPT: error: resource previously defined here.
C:\Users\**\.gradle\caches\transforms-2\files-2.1\3a673510e337bf69bd102ca32d6fbb05\appcompat-1.2.0\res\values\values.xml:1692:5-1774:25: AAPT: error: duplicate value for resource 'attr/displayOptions' with config ''.
C:\Users\**\.gradle\caches\transforms-2\files-2.1\3a673510e337bf69bd102ca32d6fbb05\appcompat-1.2.0\res\values\values.xml:1692:5-1774:25: AAPT: error: resource previously defined here.
C:\Users\**\.gradle\caches\transforms-2\files-2.1\3a673510e337bf69bd102ca32d6fbb05\appcompat-1.2.0\res\values\values.xml:1819:5-1848:25: AAPT: error: duplicate value for resource 'attr/tintMode' with config ''.
C:\Users\**\.gradle\caches\transforms-2\files-2.1\3a673510e337bf69bd102ca32d6fbb05\appcompat-1.2.0\res\values\values.xml:1819:5-1848:25: AAPT: error: resource previously defined here.
C:\Users\**\.gradle\caches\transforms-2\files-2.1\3a673510e337bf69bd102ca32d6fbb05\appcompat-1.2.0\res\values\values.xml:1849:5-1875:25: AAPT: error: duplicate value for resource 'attr/tickMarkTintMode' with config ''.
C:\Users\**\.gradle\caches\transforms-2\files-2.1\3a673510e337bf69bd102ca32d6fbb05\appcompat-1.2.0\res\values\values.xml:1849:5-1875:25: AAPT: error: resource previously defined here.
C:\Users\**\.gradle\caches\transforms-2\files-2.1\3a673510e337bf69bd102ca32d6fbb05\appcompat-1.2.0\res\values\values.xml:1885:5-1959:25: AAPT: error: duplicate value for resource 'attr/autoSizeTextType' with config ''.
C:\Users\**\.gradle\caches\transforms-2\files-2.1\3a673510e337bf69bd102ca32d6fbb05\appcompat-1.2.0\res\values\values.xml:1885:5-1959:25: AAPT: error: resource previously defined here.
C:\Users\**\.gradle\caches\transforms-2\files-2.1\3a673510e337bf69bd102ca32d6fbb05\appcompat-1.2.0\res\values\values.xml:1885:5-1959:25: AAPT: error: duplicate value for resource 'attr/drawableTintMode' with config ''.
C:\Users\**\.gradle\caches\transforms-2\files-2.1\3a673510e337bf69bd102ca32d6fbb05\appcompat-1.2.0\res\values\values.xml:1885:5-1959:25: AAPT: error: resource previously defined here.
C:\Users\**\.gradle\caches\transforms-2\files-2.1\3a673510e337bf69bd102ca32d6fbb05\appcompat-1.2.0\res\values\values.xml:1960:5-2356:25: AAPT: error: duplicate value for resource 'attr/actionBarSize' with config ''.
C:\Users\**\.gradle\caches\transforms-2\files-2.1\3a673510e337bf69bd102ca32d6fbb05\appcompat-1.2.0\res\values\values.xml:1960:5-2356:25: AAPT: error: resource previously defined here.
and also :
Execution failed for task ':app:mergeDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
C:\Users\**\.gradle\caches\transforms-2\files-2.1\3a673510e337bf69bd102ca32d6fbb05\appcompat-1.2.0\res\values\values.xml:1692:5-1774:25: AAPT: error: duplicate value for resource 'attr/navigationMode' with config ''.
my values.xml file link in zip file:
https://www.mediafire.com/file/ewu4d91g5ovl4o0/values.zip/file
Just keep reducing the version of the dependency mentioned in the path In your case its: C:\Users.gradle\caches\transforms-2\files-2.1\a0e1355bd10f51465d015cd38c7b32cb\ material-1.2.1 \res\values\values.xml andC:\Users.gradle\caches\transforms-2\files-2.1\3a673510e337bf69bd102ca32d6fbb05\ appcompat-1.2.0 \res\values\values.xml So reducing the version number for material-1.2.1 to material-1.2.0 and appcompat-1.2.0 to 1.1.0 might work. If it doesn't work then keep on reducing the version number and re-build the project each time until it works.For me it works by setting material-1.2.1 to material-1.0.0
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.
I'm trying to use SlidingMenu with SherlockActionBar but the gradle keeps giving me the following error. Please help!
I have already tried downgrading the appsupport-v4 version to 18 from 28 but still doesn't work
Caused by: org.gradle.internal.UncheckedException: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource compilation failed
D:\AndroidStudio\NNY\neredeNeYenir_Datetimepicker\build\intermediates\packaged_res\debug\values\values.xml:57:5-89: AAPT: warn: ignoring element 'g' with unknown namespace 'http://schemas.android.com/apk/res/android'.
C:\Users\MAK.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\4012345e714ae01fd13b2690ed0a225a\res\values\values.xml:153:5-155:25: AAPT: error: duplicate value for resource 'attr/background' with config ''.
C:\Users\MAK.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\4012345e714ae01fd13b2690ed0a225a\res\values\values.xml:153:5-155:25: AAPT: error: resource previously defined here.
C:\Users\MAK.gradle\caches\transforms-1\files-1.1\actionbarsherlock-4.4.0.aar\954feacd7f89ddbf974fd53623ef63f3\res\values\values.xml:87:5-89:25: AAPT: error: duplicate value for resource 'attr/navigationMode' with config ''.
C:\Users\MAK.gradle\caches\transforms-1\files-1.1\actionbarsherlock-4.4.0.aar\954feacd7f89ddbf974fd53623ef63f3\res\values\values.xml:87:5-89:25: AAPT: error: resource previously defined here.
C:\Users\MAK.gradle\caches\transforms-1\files-1.1\actionbarsherlock-4.4.0.aar\954feacd7f89ddbf974fd53623ef63f3\res\values\values.xml:87:5-89:25: AAPT: error: duplicate value for resource 'attr/displayOptions' with config ''.
C:\Users\MAK.gradle\caches\transforms-1\files-1.1\actionbarsherlock-4.4.0.aar\954feacd7f89ddbf974fd53623ef63f3\res\values\values.xml:87:5-89:25: AAPT: error: resource previously defined here.
C:\Users\MAK.gradle\caches\transforms-1\files-1.1\actionbarsherlock-4.4.0.aar\954feacd7f89ddbf974fd53623ef63f3\res\values\values.xml:469:5-471:25: AAPT: error: duplicate value for resource 'attr/actionBarSize' with config ''.
C:\Users\MAK.gradle\caches\transforms-1\files-1.1\actionbarsherlock-4.4.0.aar\954feacd7f89ddbf974fd53623ef63f3\res\values\values.xml:469:5-471:25: AAPT: error: resource previously defined here.
C:\Users\MAK.gradle\caches\transforms-1\files-1.1\actionbarsherlock-4.4.0.aar\954feacd7f89ddbf974fd53623ef63f3\res\values\values.xml:469:5-471:25: AAPT: error: duplicate value for resource 'attr/windowMinWidthMajor' with config ''.
C:\Users\MAK.gradle\caches\transforms-1\files-1.1\actionbarsherlock-4.4.0.aar\954feacd7f89ddbf974fd53623ef63f3\res\values\values.xml:469:5-471:25: AAPT: error: resource previously defined here.
C:\Users\MAK.gradle\caches\transforms-1\files-1.1\actionbarsherlock-4.4.0.aar\954feacd7f89ddbf974fd53623ef63f3\res\values\values.xml:469:5-471:25: AAPT: error: duplicate value for resource 'attr/windowMinWidthMinor' with config ''.
C:\Users\MAK.gradle\caches\transforms-1\files-1.1\actionbarsherlock-4.4.0.aar\954feacd7f89ddbf974fd53623ef63f3\res\values\values.xml:469:5-471:25: AAPT: error: resource previously defined here.
In your output you can see that you're still using the v7 support library, and getting errors because the different values in the library are duplicated in the ABS library. So you either get rid of the v7 or you update your project to work with AppCompatActivity instead of ActionBarSherlock (which would make the project more maintainable).
If you decide to update the project to api 28, you can follow the steps described here.
Cheers!