Why does AS wants compile project after flutter update - android-studio

FAILURE: Build failed with an exception.
Just updated flutter to 1.5.4-hotfix.2
and now my project doesnt compile but my co-worker had no problems with same version
CONSOLE OUTPUT
Launching lib\main.dart on SM G955F in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
Output: D:\Desktop\asdPrj\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
D:\Desktop\asdPrj\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
D:\Desktop\asdPrj\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:906: error: resource android:attr/fontVariationSettings not found.
D:\Desktop\asdPrj\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:906: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: C:\Users\Janer\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\78f68b33382372bc3dc84b96fd530582\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
C:\Users\Janer\AppData\Local\Android\sdk\platforms\android-27\android.jar\
--manifest\
D:\Desktop\asdPrj\build\app\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
-o\
D:\Desktop\asdPrj\build\app\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
-R\
#D:\Desktop\asdPrj\build\app\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
D:\Desktop\asdPrj\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
--custom-package\
ga.aninet\
-0\
apk\
--output-text-symbols\
D:\Desktop\asdPrj\build\app\intermediates\symbols\debug\R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
Output: C:\Users\Janer\.gradle\caches\transforms-1\files-1.1\appcompat-1.0.0.aar\9a8530dc700588f390ca440a65237576\res\values-v28\values-v28.xml:9:5-12:13: AAPT: error: resource android:attr/dialogCornerRadius not found.
D:\Desktop\asdPrj\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: AAPT: error: resource android:attr/dialogCornerRadius not found.
C:\Users\Janer\.gradle\caches\transforms-1\files-1.1\core-1.0.0.aar\becf871373d3300ffd53f5291be852df\res\values\values.xml:89:5-125:25: AAPT: error: resource android:attr/fontVariationSettings not found.
C:\Users\Janer\.gradle\caches\transforms-1\files-1.1\core-1.0.0.aar\becf871373d3300ffd53f5291be852df\res\values\values.xml:89:5-125:25: AAPT: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: C:\Users\Janer\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\78f68b33382372bc3dc84b96fd530582\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
C:\Users\Janer\AppData\Local\Android\sdk\platforms\android-27\android.jar\
--manifest\
D:\Desktop\asdPrj\build\app\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
-o\
D:\Desktop\asdPrj\build\app\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
-R\
#D:\Desktop\asdPrj\build\app\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
D:\Desktop\asdPrj\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
--custom-package\
ga.aninet\
-0\
apk\
--output-text-symbols\
D:\Desktop\asdPrj\build\app\intermediates\symbols\debug\R.txt\
--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 gradle url
BUILD FAILED in 5s
Finished with error: Gradle task assembleDebug failed with exit code 1
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
See [googleHref][2] for more information on the problem and how to fix it.

Execute the flutter clean command in your project, to erase everything in cache of previous compilations

Related

Can't run Flutter app error "FAILURE: Build failed with an exception."

This app is from Github
"https://github.com/wiltonribeiro/grocery_shop_flutter"
I was wondering if someone else is able to run it because i get some execution errors and I cant fix them.
I would appreciate it if someone can fix the issue
Cheers!
Edit: I appreciate your responses
the error looks like this:
"
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugResources'.
Android resource linking failed
Output: O:\grocery_shop_flutterbait\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:86: error: resource android:attr/fontVariationSettings not found.
O:\grocery_shop_flutterbait\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:87: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: C:\Users\arsla.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\6eab767dc8c1fd40d868c7361b7d30e9\aapt2-3.2.1-4818971-windows\aapt2.exe link -I
C:\Users\arsla\AppData\Local\Android\sdk\platforms\android-27\android.jar
--manifest
O:\grocery_shop_flutterbait\build\app\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml
-o
O:\grocery_shop_flutterbait\build\app\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_
-R
#O:\grocery_shop_flutterbait\build\app\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt
--auto-add-overlay
--java
O:\grocery_shop_flutterbait\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r
--custom-package
com.example.groceryshopflutter
-0
apk
--output-text-symbols
O:\grocery_shop_flutterbait\build\app\intermediates\symbols\debug\R.txt
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
Output: C:\Users\arsla.gradle\caches\transforms-1\files-1.1\core-1.1.0.aar\18619ad8df18189ffa8d36e63947ac33\res\values\values.xml:174:5-210:25: AAPT: error: resource android:attr/fontVariationSettings not found.
C:\Users\arsla.gradle\caches\transforms-1\files-1.1\core-1.1.0.aar\18619ad8df18189ffa8d36e63947ac33\res\values\values.xml:174:5-210:25: AAPT: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: C:\Users\arsla.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\6eab767dc8c1fd40d868c7361b7d30e9\aapt2-3.2.1-4818971-windows\aapt2.exe link -I
C:\Users\arsla\AppData\Local\Android\sdk\platforms\android-27\android.jar
--manifest
O:\grocery_shop_flutterbait\build\app\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml
-o
O:\grocery_shop_flutterbait\build\app\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_
-R
#O:\grocery_shop_flutterbait\build\app\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt
--auto-add-overlay
--java
O:\grocery_shop_flutterbait\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r
--custom-package
com.example.groceryshopflutter
-0
apk
--output-text-symbols
O:\grocery_shop_flutterbait\build\app\intermediates\symbols\debug\R.txt
--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 19s
Exception: Gradle task assembleDebug failed with exit code 1
""
I tried to compile it to android and i could fix this error by changing compileSdkVersion to 28
However the solution is applicable if you follow the instruction on https://github.com/wiltonribeiro/grocery_shop_flutter
Yes, it works perfectly fine in the latest version.product picture (only for ios phone running).
No need to worry>>> Only on terminal, It still tells an error message "Your Flutter application is created using an older version of the Android
embedding. It's being deprecated in favor of Android embedding v2. Follow the
steps at
https://flutter.dev/go/android-project-migration"
The output looks like this!!!

Android studio suddenly getting Resource linking failed

resource linking failed i got this error suddenly while working with my android studio sdk version 28 i am getting below error in my build what to do can some will help me with my problem
org.gradle.api.tasks.TaskExecutionException: Execution failed for task
':app:processDebugResources'. at
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:103)
at
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:73)
at
org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
at
org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
at
org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at
org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
at
org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
at
org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
at
org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
at
org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
at
org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
at
org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at
org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at
org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at
org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:256)
at
org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at
org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at
org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at
org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at
org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:249)
at
org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:238)
at
org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
at
org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
at
org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
at
org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
at
org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:663)
at
org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:597)
at
org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
at
org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at
org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at
org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:745) Caused by:
com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource
linking failed Output:
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_btn_colored_borderless_text_material.xml:20:
error: attribute alpha (aka com.example.vijay.myplacemysaloon:alpha)
not found.
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_btn_colored_text_material.xml:20:
error: attribute alpha (aka com.example.vijay.myplacemysaloon:alpha)
not found.
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_tint_btn_checkable.xml:19:
error: attribute alpha (aka com.example.vijay.myplacemysaloon:alpha)
not found.
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_tint_default.xml:19:
error: attribute alpha (aka com.example.vijay.myplacemysaloon:alpha)
not found.
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_tint_edittext.xml:19:
error: attribute alpha (aka com.example.vijay.myplacemysaloon:alpha)
not found.
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_tint_seek_thumb.xml:19:
error: attribute alpha (aka com.example.vijay.myplacemysaloon:alpha)
not found.
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_tint_spinner.xml:19:
error: attribute alpha (aka com.example.vijay.myplacemysaloon:alpha)
not found.
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_tint_switch_track.xml:19:
error: attribute alpha (aka com.example.vijay.myplacemysaloon:alpha)
not found.
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_tint_switch_track.xml:20:
error: attribute alpha (aka com.example.vijay.myplacemysaloon:alpha)
not found.
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_tint_switch_track.xml:21:
error: attribute alpha (aka com.example.vijay.myplacemysaloon:alpha)
not found. error: failed linking file resources.
Command:
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\3630ad447130c7775c2d71e53cbfe7c2\aapt2-3.2.1-4818971-windows\aapt2.exe
link -I\
C:\Users\vijay\AppData\Local\Android\Sdk\platforms\android-28\android.jar\
--manifest\
C:\Users\vijay\AndroidStudioProjects\New folder\MyplaceMySaloon\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
-o\
C:\Users\vijay\AndroidStudioProjects\New folder\MyplaceMySaloon\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
-R\
#C:\Users\vijay\AndroidStudioProjects\New folder\MyplaceMySaloon\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
C:\Users\vijay\AndroidStudioProjects\New folder\MyplaceMySaloon\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
--custom-package\
com.example.vijay.myplacemysaloon\
-0\
apk\
--output-text-symbols\
C:\Users\vijay\AndroidStudioProjects\New folder\MyplaceMySaloon\app\build\intermediates\symbols\debug\R.txt\
--no-version-vectors Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0 Output:
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_btn_colored_borderless_text_material.xml:20:
AAPT: error: attribute alpha (aka
com.example.vijay.myplacemysaloon:alpha) not found.
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_btn_colored_text_material.xml:20:
AAPT: error: attribute alpha (aka
com.example.vijay.myplacemysaloon:alpha) not found.
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_tint_btn_checkable.xml:19:
AAPT: error: attribute alpha (aka
com.example.vijay.myplacemysaloon:alpha) not found.
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_tint_default.xml:19:
AAPT: error: attribute alpha (aka
com.example.vijay.myplacemysaloon:alpha) not found.
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_tint_edittext.xml:19:
AAPT: error: attribute alpha (aka
com.example.vijay.myplacemysaloon:alpha) not found.
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_tint_seek_thumb.xml:19:
AAPT: error: attribute alpha (aka
com.example.vijay.myplacemysaloon:alpha) not found.
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_tint_spinner.xml:19:
AAPT: error: attribute alpha (aka
com.example.vijay.myplacemysaloon:alpha) not found.
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_tint_switch_track.xml:19:
AAPT: error: attribute alpha (aka
com.example.vijay.myplacemysaloon:alpha) not found.
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_tint_switch_track.xml:20:
AAPT: error: attribute alpha (aka
com.example.vijay.myplacemysaloon:alpha) not found.
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_tint_switch_track.xml:21:
AAPT: error: attribute alpha (aka
com.example.vijay.myplacemysaloon:alpha) not found.
error: failed linking file resources. Command: C:\Users\vijay.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\3630ad447130c7775c2d71e53cbfe7c2\aapt2-3.2.1-4818971-windows\aapt2.exe
link -I\
C:\Users\vijay\AppData\Local\Android\Sdk\platforms\android-28\android.jar\
--manifest\
C:\Users\vijay\AndroidStudioProjects\New folder\MyplaceMySaloon\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
-o\
C:\Users\vijay\AndroidStudioProjects\New folder\MyplaceMySaloon\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
-R\
#C:\Users\vijay\AndroidStudioProjects\New folder\MyplaceMySaloon\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
C:\Users\vijay\AndroidStudioProjects\New folder\MyplaceMySaloon\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
--custom-package\
com.example.vijay.myplacemysaloon\
-0\
apk\
--output-text-symbols\
C:\Users\vijay\AndroidStudioProjects\New folder\MyplaceMySaloon\app\build\intermediates\symbols\debug\R.txt\
--no-version-vectors Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0 at
com.android.build.gradle.internal.res.Aapt2ErrorUtils.rewriteException(Aapt2ErrorUtils.kt:97)
at
com.android.build.gradle.internal.res.Aapt2ErrorUtils.rewriteLinkException(Aapt2ErrorUtils.kt:73)
at
com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask.invokeAaptForSplit(LinkApplicationAndroidResourcesTask.java:527)
at
com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask.doFullTaskAction(LinkApplicationAndroidResourcesTask.java:275)
at
com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:106)
at sun.reflect.GeneratedMethodAccessor190.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498) at
org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73) at
org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:50)
at
org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
at
org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
at
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:124)
at
org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at
org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at
org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at
org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:113)
at
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:95)
... 33 more Caused by:
com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource
linking failed Output:
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_btn_colored_borderless_text_material.xml:20:
error: attribute alpha (aka com.example.vijay.myplacemysaloon:alpha)
not found.
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_btn_colored_text_material.xml:20:
error: attribute alpha (aka com.example.vijay.myplacemysaloon:alpha)
not found.
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_tint_btn_checkable.xml:19:
error: attribute alpha (aka com.example.vijay.myplacemysaloon:alpha)
not found.
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_tint_default.xml:19:
error: attribute alpha (aka com.example.vijay.myplacemysaloon:alpha)
not found.
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_tint_edittext.xml:19:
error: attribute alpha (aka com.example.vijay.myplacemysaloon:alpha)
not found.
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_tint_seek_thumb.xml:19:
error: attribute alpha (aka com.example.vijay.myplacemysaloon:alpha)
not found.
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_tint_spinner.xml:19:
error: attribute alpha (aka com.example.vijay.myplacemysaloon:alpha)
not found.
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_tint_switch_track.xml:19:
error: attribute alpha (aka com.example.vijay.myplacemysaloon:alpha)
not found.
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_tint_switch_track.xml:20:
error: attribute alpha (aka com.example.vijay.myplacemysaloon:alpha)
not found.
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\0b800212ff172d351e952bcb74f957f1\res\color\abc_tint_switch_track.xml:21:
error: attribute alpha (aka com.example.vijay.myplacemysaloon:alpha)
not found. error: failed linking file resources.
Command:
C:\Users\vijay.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\3630ad447130c7775c2d71e53cbfe7c2\aapt2-3.2.1-4818971-windows\aapt2.exe
link -I\
C:\Users\vijay\AppData\Local\Android\Sdk\platforms\android-28\android.jar\
--manifest\
C:\Users\vijay\AndroidStudioProjects\New folder\MyplaceMySaloon\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
-o\
C:\Users\vijay\AndroidStudioProjects\New folder\MyplaceMySaloon\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
-R\
#C:\Users\vijay\AndroidStudioProjects\New folder\MyplaceMySaloon\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
C:\Users\vijay\AndroidStudioProjects\New folder\MyplaceMySaloon\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
--custom-package\
com.example.vijay.myplacemysaloon\
-0\
apk\
--output-text-symbols\
C:\Users\vijay\AndroidStudioProjects\New folder\MyplaceMySaloon\app\build\intermediates\symbols\debug\R.txt\
--no-version-vectors Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0 at
com.android.builder.internal.aapt.v2.Aapt2DaemonImpl.doLink(Aapt2DaemonImpl.kt:177)
at
com.android.builder.internal.aapt.v2.Aapt2Daemon.link(Aapt2Daemon.kt:103)
at
com.android.builder.internal.aapt.v2.Aapt2DaemonManager$LeasedAaptDaemon.link(Aapt2DaemonManager.kt:176)
at
com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:823)
at
com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask.invokeAaptForSplit(LinkApplicationAndroidResourcesTask.java:525)
... 49 more
I have just had a very similiar problem.
It seems as if the resource file R has been deleted off. In my case it disappeared when I created a Google Maps activity.
Try:
Build -> Clean Project
That cleans the gradle file
Alternatively:
File->Invalidate Caches
Then sync the project with gradle files
Give these a go and see if it does the trick.
I found that creating a new project and copying and pasting the code from the 'old' project worked best though. It does take a little time because you'd have to create all xml files and java classes again, but considering how many hours I have browsed the web to find a fix, creating a new project only took about 30 min- of course that depends on the size of your project. Just make sure (if you do go ahead and copy and paste the code) that you dont accidentally copy the package names from the 'old' project into your new one if your new project is named differently.
Good luck!

Processing manifest failed android studio

I have an issue in android studio where I run the project and it kicks up an error. There isn't really much else I know, but here's the full error:
Android resource linking failed
Output: C:\Users\John\AndroidStudioProjects\MyApplication\app\build\intermediates\instant_run_merged_manifests\debug\processDebugManifest\instant-run\AndroidManifest.xml:44: error: resource string/google_maps_key (aka com.example.john.myapplication:string/google_maps_key) not found.
error: failed processing manifest.
Command: C:\Users\John\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.0-4818971-windows.jar\400d656be4460564aa03c7fb5fa4f8bf\aapt2-3.2.0-4818971-windows\aapt2.exe link -I\
C:\Users\John\AppData\Local\Android\Sdk\platforms\android-28\android.jar\
-I\
C:\Users\John\AndroidStudioProjects\MyApplication\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
--manifest\
C:\Users\John\AndroidStudioProjects\MyApplication\app\build\intermediates\instant_run_merged_manifests\debug\processDebugManifest\instant-run\AndroidManifest.xml\
-o\
C:\Users\John\AndroidStudioProjects\MyApplication\app\build\intermediates\instant_run_main_apk_resources\debug\instantRunMainApkResourcesDebug\out\main_resources\resources_ap\
--auto-add-overlay\
-0\
apk\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.0-4818971-windows Daemon #0
It occurred here.
Please help!
You probably have something like this in your Android Manifest:
meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_maps_key"
You need to add that string to your app/src/main/res/values/strings.xml file:
<resources>
<string name="google_maps_key"> COPY THE VALUE FROM GOOGLE CLOUD PLATFORM </string>
</resources>
You can follow this tutorial to get the API key.

I am getting the following errors in Android Studio "Android Resource Linking Failed"

Android resource linking failed
Output: C:\Users\NASIR CHANGEZI\AndroidStudioProjects\MyFirstProject\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml:25: error: resource style/AppTheme (aka com.example.nasirchangezi.myfirstproject:style/AppTheme) not found.
error: failed processing manifest.
Command: C:\Users\NASIR CHANGEZI\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\7c69ee26222ec96ad56e657c99f59917\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
C:\Users\NASIR CHANGEZI\AppData\Local\Android\Sdk\platforms\android-28\android.jar\
--manifest\
C:\Users\NASIR CHANGEZI\AndroidStudioProjects\MyFirstProject\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
-o\
C:\Users\NASIR CHANGEZI\AndroidStudioProjects\MyFirstProject\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
-R\
#C:\Users\NASIR CHANGEZI\AndroidStudioProjects\MyFirstProject\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
C:\Users\NASIR CHANGEZI\AndroidStudioProjects\MyFirstProject\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
--custom-package\
com.example.nasirchangezi.myfirstproject\
-0\
apk\
--output-text-symbols\
C:\Users\NASIR CHANGEZI\AndroidStudioProjects\MyFirstProject\app\build\intermediates\symbols\debug\R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
In your android manifest you are referencing a style "AppTheme". Check your res/values/.xml files if they contain this resource, if not, add it.

Android Studio: Error after deleting file

I got this error:
Error:Execution failed for task ':app:generateDebugBuildConfig'. > java.io.IOException: Could not delete path 'C:\Users\Guest Account\Documents\COLLEGE\FYP\7. Iteration 4\fridge iteration 4\app\build\generated\source\buildConfig\debug\com'.
and saw 'could not delete path' so I decided to follow the path and delete the path. When I reran the app I got seven new errors:
Error:Execution failed for task ':app:processDebugResources'.
Failed to execute aapt
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:failed linking file resources.
Error:attribute 'com.virtual.fridge:layout_behavior' not found.
Error:error: attribute 'com.virtual.fridge:layout_behavior' not found.
In my even log I have two new messages:
* daemon not running; starting now at tcp:5037
21:10 * daemon started successfully
I am going to presume this is down to deleting that file.. is there anything I can do? Really new to android studio so I appreciate any help. Please tell me what other information I shoudl provide
I cleaned the project and built it and it worked

Resources