Flutter degugging APK - android

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.

Related

Execution failed for task ':app:processReleaseResources' AAPT: error: resource android:attr/lStar not found

I need help with a project I am working on, the thing is everything was working fine a few days back, but then I had to travel now when I try to run the command react-native run-android I received the following error
* What went wrong:
Execution failed for task ':app:processReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
C:\Users\sarat\.gradle\caches\transforms-2\files-2.1\b5c19e49f776b182a5792cfc47bb4d7e\core-1.7.0\res\values\values.xml:105:5-114:25: AAPT: error: resource android:attr/lStar not found.
AAPT: error: resource android:attr/lStar not found.
I suggest you to check your drawable folders by theme.

expo run:android - AAPT: error: duplicate value for resource 'attr/show_buffering' with config ''

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

Task :app:processDebugResources FAILED when doing react-native run-android

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.

Flutter Build APK: Execution failed for task ':speech_recognition:verifyReleaseResources'

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.

Flutter: Resource linking failed

I am getting this error alter connecting my flutter app to the firebase. I dont know whats the reason but I am getting this error:
FAILURE: Build failed with an exception.
What went wrong:
Execution
failed for task :app:process Debug Resources.
Android resource linking failed
In my case i was getting this error :
Execution failed for task ':google_sign_in:verifyReleaseResources'.
with follwing error :
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
Output: D:\flutter\dashboard_app\dashboad_app\build\google_sign_in\intermediates\res\merged\release\values\values.xml:197: error: resource android:attr/fontVariationSettings not f
ound.
D:\flutter\dashboard_app\dashboad_app\build\google_sign_in\intermediates\res\merged\release\values\values.xml:198: error: resource android:attr/ttcIndex not found.
error: failed linking references.
So i updated my google_sign_in sdk to : google_sign_in 4.0.1+1 from google_sdk

Categories

Resources