Execution failed for task ':app:processDebugResources'.1 - gradle

I clearly have no clue why it shows this error. All solutions are appreciated.
What went wrong:
Execution failed for task ':app:processDebugResources'.
Android resource linking failed
Output: W/ziparchive( 9548): Unable to open 'C:\Users\admin\AppData\Local\Android\sdk\platforms\android-28\android.jar': No such file or directory
error: failed to open APK: I/O error.
Command: C:\Users\admin.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\c8dfbdcc79a1dd8c0cb75349d60f6c77\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
C:\Users\admin\AppData\Local\Android\sdk\platforms\android-28\android.jar\
--manifest\
C:\Users\gaurav\tutorial\build\app\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
-o\
C:\Users\gaurav\tutorial\build\app\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
-R\
#C:\Users\gaurav\tutorial\build\app\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
C:\Users\gaurav\tutorial\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
--custom-package\
com.example.tutorial\
-0\
apk\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
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 22s
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
See https://flutter.dev/docs/development/androidx-migration for more information on the problem and how to fix it.
Finished with error: Gradle task assembleDebug failed with exit code 1

Update you sdk version to 28. Edit the file build.gradle and change property compileSdkVersion up to 28.

Related

How to fix a diagnostic error in flutter?

When I run the application gradle is failing to build
Compiler message:
file:///C:/Users/Wellick/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_sticky_header-0.3.4/lib/src/widgets/sticky_header_layout_builder.dart:147:16:
Error: The argument type 'String' can't be assigned to the parameter
type 'DiagnosticsNode'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart'
('file:///C:/Users/Wellick/Documents/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to
'DiagnosticsNode'.
context: context);
^ Compiler failed on C:\Users\Wellick\Desktop\flutter\rapidinho-master\lib\main.dart
FAILURE: Build failed with an exception.
Where: Script 'C:\Users\Wellick\Documents\flutter\packages\flutter_tools\gradle\flutter.gradle'
line: 665
What went wrong: Execution failed for task ':app:compileflutterBuildDebugArm'.
Process 'command 'C:\Users\Wellick\Documents\flutter\bin\flutter.bat'' finished with
non-zero exit value 1
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 24s Finished with error: Gradle task assembleDebug
failed with exit code 1
It seems that this issue was due to the previous version 0.3.4 to be exact, the issue was reported in GitHub and the fix is to upgrade the version to 0.4.0. Currently, the latest version 0.5.0 is more stable than the previous versions.

Execution failed for task ':app:processDebugResources'. > Android resource linking failed can longer build RN android version

The android version of my React native app now refuses to build. I have updated the compiledSKD version to 28 as suggested in this post.
This is the error I get when I attempt to build on a physical device:
What went wrong: Execution failed for task ':app:processDebugResources'.
Android resource linking failed Output: /Users/someguy/projects/third/someapp/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:422:
error: resource android:attr/fontVariationSettings not found.
/Users/someguy/projects/third/someapp/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:422:
error: resource android:attr/ttcIndex not found. error: failed
linking references.
Command: /Users/someguy/.gradle/caches/transforms-1/files-1.1/aapt2-3.5.0-alpha03-5252756-osx.jar/d3ea99fc2d1356bcc9bc022a544dfd8b/aapt2-3.5.0-alpha03-5252756-osx/aapt2
link -I\
/Users/someguy/Library/Android/sdk/platforms/android-26/android.jar\
--manifest\
/Users/someguy/projects/third/someapp/android/app/build/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml\
-o\
/Users/someguy/projects/third/someapp/android/app/build/intermediates/processed_res/debug/processDebugResources/out/resources-debug.ap_\
-R\
#/Users/someguy/projects/third/someapp/android/app/build/intermediates/incremental/processDebugResources/resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
/Users/someguy/projects/third/someapp/android/app/build/generated/not_namespaced_r_class_sources/debug/processDebugResources/r\
--proguard-main-dex\
/Users/someguy/projects/third/someapp/android/app/build/intermediates/legacy_multidex_aapt_derived_proguard_rules/debug/processDebugResources/manifest_keep.txt\
--custom-package\
com.someapp\
-0\
apk\
--output-text-symbols\
/Users/someguy/projects/third/someapp/android/app/build/intermediates/symbols/debug/R.txt\
--no-version-vectors Daemon: AAPT2 aapt2-3.5.0-alpha03-5252756-osx Daemon #0 Output:
/Users/someguy/.gradle/caches/transforms-1/files-1.1/drawee-1.3.0.aar/cdd2e6e5cf23d268c647bf7bca6ef749/res/values/values.xml:3:5-53:675:
AAPT: error: resource android:attr/fontVariationSettings not found.
/Users/someguy/.gradle/caches/transforms-1/files-1.1/drawee-1.3.0.aar/cdd2e6e5cf23d268c647bf7bca6ef749/res/values/values.xml:3:5-53:675:
AAPT: error: resource android:attr/ttcIndex not found.
error: failed linking references. Command: /Users/someguy/.gradle/caches/transforms-1/files-1.1/aapt2-3.5.0-alpha03-5252756-osx.jar/d3ea99fc2d1356bcc9bc022a544dfd8b/aapt2-3.5.0-alpha03-5252756-osx/aapt2
link -I\
/Users/someguy/Library/Android/sdk/platforms/android-26/android.jar\
--manifest\
/Users/someguy/projects/third/someapp/android/app/build/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml\
-o\
/Users/someguy/projects/third/someapp/android/app/build/intermediates/processed_res/debug/processDebugResources/out/resources-debug.ap_\
-R\
#/Users/someguy/projects/third/someapp/android/app/build/intermediates/incremental/processDebugResources/resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
/Users/someguy/projects/third/someapp/android/app/build/generated/not_namespaced_r_class_sources/debug/processDebugResources/r\
--proguard-main-dex\
/Users/someguy/projects/third/someapp/android/app/build/intermediates/legacy_multidex_aapt_derived_proguard_rules/debug/processDebugResources/manifest_keep.txt\
--custom-package\
com.someapp\
-0\
apk\
--output-text-symbols\
/Users/someguy/projects/third/someapp/android/app/build/intermediates/symbols/debug/R.txt\
--no-version-vectors Daemon: AAPT2 aapt2-3.5.0-alpha03-5252756-osx Daemon #0
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 133 actionable tasks: 2 executed, 131 up-to-date
I've also double checked my AndroidManifest.xml file to see if I have any hanging brackets as suggested in this post
Did you run the bundle command?
sudo react-native bundle --platform android --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --dev false --reset-cache --assets-dest android/app/src/main/res/
And close the existing packager and re-open packager.
I resolved this issue by adding androidXCore="1.6.0" in myApp/android/build.gradle to look like this
minSdkVersion = 21
compileSdkVersion = 29
targetSdkVersion = 29
androidXCore="1.6.0"

Flutter Assemble debug linkng error app will not compile, tried everything

FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
Output: /home/ollie2224/StudioProjects/24Hrs/build/app/intermediates/incremental/mergeDebugResources/merged.dir/values-v28/values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
/home/ollie2224/StudioProjects/24Hrs/build/app/intermediates/incremental/mergeDebugResources/merged.dir/values-v28/values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
/home/ollie2224/StudioProjects/24Hrs/build/app/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:905: error: resource android:attr/fontVariationSettings not found.
/home/ollie2224/StudioProjects/24Hrs/build/app/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:905: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: /home/ollie2224/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-linux.jar/5495ad1b91b297bb4c274b380506e4f6/aapt2-3.2.1-4818971-linux/aapt2 link -I\
/home/ollie2224/Android/Sdk/platforms/android-26/android.jar\
--manifest\
/home/ollie2224/StudioProjects/24Hrs/build/app/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml\
-o\
/home/ollie2224/StudioProjects/24Hrs/build/app/intermediates/processed_res/debug/processDebugResources/out/resources-debug.ap_\
-R\
#/home/ollie2224/StudioProjects/24Hrs/build/app/intermediates/incremental/processDebugResources/resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
/home/ollie2224/StudioProjects/24Hrs/build/app/generated/not_namespaced_r_class_sources/debug/processDebugResources/r\
--custom-package\
com.rookieplays.tf\
-0\
apk\
--output-text-symbols\
/home/ollie2224/StudioProjects/24Hrs/build/app/intermediates/symbols/debug/R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-linux Daemon #0
Output: /home/ollie2224/.gradle/caches/transforms-1/files-1.1/appcompat-1.0.0.aar/7ffba96d1618b0c08b4da202d0eddb85/res/values-v28/values-v28.xml:9:5-12:13: AAPT: error: resource android:attr/dialogCornerRadius not found.
/home/ollie2224/StudioProjects/24Hrs/build/app/intermediates/incremental/mergeDebugResources/merged.dir/values-v28/values-v28.xml:11: AAPT: error: resource android:attr/dialogCornerRadius not found.
/home/ollie2224/.gradle/caches/transforms-1/files-1.1/core-1.0.0.aar/21a52465ad0e625487952f3012c37e7c/res/values/values.xml:89:5-125:25: AAPT: error: resource android:attr/fontVariationSettings not found.
/home/ollie2224/.gradle/caches/transforms-1/files-1.1/core-1.0.0.aar/21a52465ad0e625487952f3012c37e7c/res/values/values.xml:89:5-125:25: AAPT: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: /home/ollie2224/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-linux.jar/5495ad1b91b297bb4c274b380506e4f6/aapt2-3.2.1-4818971-linux/aapt2 link -I\
/home/ollie2224/Android/Sdk/platforms/android-26/android.jar\
--manifest\
/home/ollie2224/StudioProjects/24Hrs/build/app/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml\
-o\
/home/ollie2224/StudioProjects/24Hrs/build/app/intermediates/processed_res/debug/processDebugResources/out/resources-debug.ap_\
-R\
#/home/ollie2224/StudioProjects/24Hrs/build/app/intermediates/incremental/processDebugResources/resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
/home/ollie2224/StudioProjects/24Hrs/build/app/generated/not_namespaced_r_class_sources/debug/processDebugResources/r\
--custom-package\
com.rookieplays.tf\
-0\
apk\
--output-text-symbols\
/home/ollie2224/StudioProjects/24Hrs/build/app/intermediates/symbols/debug/R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-linux Daemon #0
* 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
Finished with error: Gradle task assembleDebug failed with exit code 1
This looks like https://github.com/flutter/flutter/issues/27106
You probably updated to newest plugins but didn't migrate to AndroidX yet, which is required for the newest plugin versions.
For more details see https://github.com/flutter/flutter/issues/27128#issuecomment-458274311
https://developer.android.com/jetpack/androidx/migrate
With Android Studio 3.2 and higher, you can quickly migrate an existing project to use AndroidX by selecting Refactor > Migrate to AndroidX from the menu bar.
For that to work you need to open the android/ directory of your project directly https://flutter.io/docs/development/tools/android-studio#android-ide

NativeScript UI Autocomplete don't compiled

In my nativescript app, I have a problem about using nativescript ui autocomplete. I compile my mobile application to android apps. It has an error as below
<======-------> 50% CONFIGURING [3s]
<====---------> 35% EXECUTING [13s]
<======-------> 51% EXECUTING [20s]
Exception in thread "main" java.lang.ClassNotFoundException: Class: com.telerik.widget.autocomplete.ShowSuggestionListListener
at org.nativescript.staticbindinggenerator.Generator.getClass(Generator.java:776)
at org.nativescript.staticbindinggenerator.Generator.collectInterfaceMethods(Generator.java:703)
at org.nativescript.staticbindinggenerator.Generator.getPublicApi(Generator.java:227)und 0 errors. Watching for file changes.
at org.nativescript.staticbindinggenerator.Generator.writeBinding(Generator.java:342)
at org.nativescript.staticbindinggenerator.Generator.generateBinding(Generator.java:133)
at org.nativescript.staticbindinggenerator.Generator.processRows(Generator.java:172)
at org.nativescript.staticbindinggenerator.Generator.generateBindings(Generator.java:90)
at org.nativescript.staticbindinggenerator.Generator.writeBindings(Generator.java:66)
at org.nativescript.staticbindinggenerator.Main.main(Main.java:47)
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:runSbg'.
Process 'command '/usr/lib/jvm/java-8-openjdk-amd64/bin/java'' finished with non-zero exit value 1
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 25s
10:34:24 - Found 0 errors. Watching for file changes.
Unable to apply changes on device: 192.168.80.101:5555. Error is: Command ./gradlew failed with exit code 1.
Executing after-watch hook from /home/andre/nativescript/TigaRoda/hooks/after-watch/nativescript-dev-typescript.js
Stopping tsc watch
Executing after-watch hook from /home/andre/nativescript/TigaRoda/hooks/after-watch/nativescript-dev-webpack.js
Stopping webpack watch
delete node_modules, platforms, hooks folders and package-lock.json file
run
npm i
rebuild the project ->
tns run android
or
tns build android

Could not resolve all files for configuration ':url_launcher:lintClassPath'

I have flutter 1.0.0
In my pubspec.yaml, I added url_launcher: ^4.0.2
Without importing url_launcher, I am getting those errors:
Launching lib\main.dart on BBD100 2 in debug mode...
FAILURE: Build failed with an exception.
What went wrong: Could not resolve all files for configuration ':url_launcher:lintClassPath'.
Could not resolve com.android.tools.lint:lint-gradle:26.2.1. Required by:
project :url_launcher
Could not resolve com.android.tools.lint:lint-gradle:26.2.1.
Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle/26.2.1/lint-gradle-26.2.1.pom'.
Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle/26.2.1/lint-gradle-26.2.1.pom'.
Connect to 10.10.208.70:8080 [/10.10.208.70] failed: Connection timed out: connect
Could not resolve com.android.tools.lint:lint-gradle:26.2.1.
Could not get resource 'https://jcenter.bintray.com/com/android/tools/lint/lint-gradle/26.2.1/lint-gradle-26.2.1.pom'.
Could not GET 'https://jcenter.bintray.com/com/android/tools/lint/lint-gradle/26.2.1/lint-gradle-26.2.1.pom'.
Connect to 10.10.208.70:8080 [/10.10.208.70] failed: Connection timed out: connect
Could not resolve com.android.tools.lint:lint-gradle:26.2.1.
Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle/26.2.1/lint-gradle-26.2.1.pom'.
Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle/26.2.1/lint-gradle-26.2.1.pom'.
Connect to 10.10.208.70:8080 [/10.10.208.70] failed: Connection timed out: connect
Could not resolve com.android.tools.lint:lint-gradle:26.2.1.
Could not get resource 'https://jcenter.bintray.com/com/android/tools/lint/lint-gradle/26.2.1/lint-gradle-26.2.1.pom'.
Could not GET 'https://jcenter.bintray.com/com/android/tools/lint/lint-gradle/26.2.1/lint-gradle-26.2.1.pom'.
Connect to 10.10.208.70:8080 [/10.10.208.70] failed: Connection timed out: connect
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 1m 33s Gradle task assembleDebug failed with exit code
1 Exited (sigterm)
Anyone can help me to debug that issue?
I tried reinstalling Flutter without any success.
Flutter doctor did not detect anything wrong.
Thanks in advance!
*** How can I use --stacktrace, --info or --debug options?
You can try moving maven_url / google() on top of jcenter() inside
C:\flutter\packages\flutter_tools\gradle\flutter.gradle.
You can follow the steps,
flutter clean
flutter pub get
flutter run

Resources