I am trying to use Infrastructure as Code (IaC) Scanning scans my IaC configuration files for known vulnerabilities. Reference: https://docs.gitlab.com/ee/user/application_security/iac_scanning/. However, I encountered the system problem in the pipeline.
[DEBU] [kics] [2022-11-11T03:55:29Z] [/go/pkg/mod/gitlab.com/gitlab-org/security-products/analyzers/command#v1.9.2/run.go:256] ▶ SAST_EXCLUDED_PATHS=spec,test,tests,tmp39
[INFO] [kics] [2022-11-11T03:55:29Z] [/go/pkg/mod/gitlab.com/gitlab-org/security-products/analyzers/command#v1.9.2/run.go:131] ▶ Detecting project
[INFO] [kics] [2022-11-11T03:55:29Z] [/go/pkg/mod/gitlab.com/gitlab-org/security-products/analyzers/command#v1.9.2/run.go:153] ▶ Analyzer will attempt to analyze all projects in the repository41
[INFO] [kics] [2022-11-11T03:55:29Z] [/go/pkg/mod/gitlab.com/gitlab-org/security-products/analyzers/command#v1.9.2/run.go:165] ▶ Running analyzer42
[DEBU] [kics] [2022-11-11T03:55:29Z] [/go/src/app/analyze.go:48] ▶ custom rulesets not enabled
[INFO] [kics] [2022-11-11T03:55:29Z] [/go/src/app/analyze.go:67] ▶ path /builds/leo/tcf
[ERRO] [kics] [2022-11-11T03:55:38Z] [/go/src/app/analyze.go:87] ▶ Encountered a system problem; status code: 2, error: exit status 2, detail:
[FATA] [kics] [2022-11-11T03:55:38Z] [/go/src/app/main.go:30] ▶ kics scanner failure: exit status 2
Uploading artifacts for failed job00:0048Uploading artifacts...
WARNING: gl-sast-report.json: no matching files. Ensure that the artifact path is relative to the working directory
ERROR: No files to upload
Cleaning up project directory and file based variables00:0154ERROR: Job failed: exit code 1
I can't find relevant information about the errors. How can I solve the errors?
You can use your own config, independent of the GitLab template.
gitlab-ci.yml:
image:
name: checkmarx/kics:latest
entrypoint: [""]
script:
- kics scan -q /app/bin/assets/queries -p ${PWD} --ignore-on-exit all --report-formats glsast -o ${PWD} --output-name kics-results
artifacts:
reports:
sast: gl-sast-kics-results.json
when: always
Everything was woing Great, getting ready to test APK on diferent devices, but now, when i try to build, gave me this error:
Executing tasks: [:app:assembleDebug] in project C:\Users\Diego\Desktop\Kaiser
> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:compileDebugAidl NO-SOURCE
> Task :app:generateDebugBuildConfig UP-TO-DATE
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:generateDebugResValues UP-TO-DATE
> Task :app:generateDebugResources UP-TO-DATE
> Task :app:processDebugGoogleServices UP-TO-DATE
> Task :app:mergeDebugResources UP-TO-DATE
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
> Task :app:extractDeepLinksDebug UP-TO-DATE
> Task :app:processDebugManifest UP-TO-DATE
> Task :app:processDebugResources
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Users\\Diego\\.gradle\\caches\\transforms-2\\files-2.1\\42c451172659b686dff6601c1a023c68\\jetified-ui_legacy-8.12.0\\res\\layout\\list_preference_layout.xml","position":{"startLine":11}}],"original":"C:\\Users\\Diego\\.gradle\\caches\\transforms-2\\files-2.1\\42c451172659b686dff6601c1a023c68\\jetified-ui_legacy-8.12.0\\res\\layout\\list_preference_layout.xml:12: AAPT: warn: generated id 'android:id/icon' for external package 'android'.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Users\\Diego\\.gradle\\caches\\transforms-2\\files-2.1\\42c451172659b686dff6601c1a023c68\\jetified-ui_legacy-8.12.0\\res\\layout\\list_preference_layout.xml","position":{"startLine":31}}],"original":"C:\\Users\\Diego\\.gradle\\caches\\transforms-2\\files-2.1\\42c451172659b686dff6601c1a023c68\\jetified-ui_legacy-8.12.0\\res\\layout\\list_preference_layout.xml:32: AAPT: warn: generated id 'android:id/summary' for external package 'android'.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Users\\Diego\\.gradle\\caches\\transforms-2\\files-2.1\\42c451172659b686dff6601c1a023c68\\jetified-ui_legacy-8.12.0\\res\\layout\\list_preference_layout.xml","position":{"startLine":25}}],"original":"C:\\Users\\Diego\\.gradle\\caches\\transforms-2\\files-2.1\\42c451172659b686dff6601c1a023c68\\jetified-ui_legacy-8.12.0\\res\\layout\\list_preference_layout.xml:26: AAPT: warn: generated id 'android:id/title' for external package 'android'.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Users\\Diego\\.gradle\\caches\\transforms-2\\files-2.1\\42c451172659b686dff6601c1a023c68\\jetified-ui_legacy-8.12.0\\res\\layout\\list_preference_layout.xml","position":{"startLine":42}}],"original":"C:\\Users\\Diego\\.gradle\\caches\\transforms-2\\files-2.1\\42c451172659b686dff6601c1a023c68\\jetified-ui_legacy-8.12.0\\res\\layout\\list_preference_layout.xml:43: AAPT: warn: generated id 'android:id/widget_frame' for external package 'android'.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Users\\Diego\\Desktop\\Kaiser\\app\\src\\main\\res\\layout\\activity_main.xml","position":{"startLine":9}}],"original":"C:\\Users\\Diego\\Desktop\\Kaiser\\app\\src\\main\\res\\layout\\activity_main.xml:10: AAPT: error: resource drawable/mas (aka com.kaiser:drawable/mas) not found.\n ","tool":"AAPT"}
> Task :app:processDebugResources FAILED
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\Diego\.gradle\caches\transforms-2\files-2.1\42c451172659b686dff6601c1a023c68\jetified-ui_legacy-8.12.0\res\layout\list_preference_layout.xml:12: AAPT: warn: generated id 'android:id/icon' for external package 'android'.
C:\Users\Diego\.gradle\caches\transforms-2\files-2.1\42c451172659b686dff6601c1a023c68\jetified-ui_legacy-8.12.0\res\layout\list_preference_layout.xml:32: AAPT: warn: generated id 'android:id/summary' for external package 'android'.
C:\Users\Diego\.gradle\caches\transforms-2\files-2.1\42c451172659b686dff6601c1a023c68\jetified-ui_legacy-8.12.0\res\layout\list_preference_layout.xml:26: AAPT: warn: generated id 'android:id/title' for external package 'android'.
C:\Users\Diego\.gradle\caches\transforms-2\files-2.1\42c451172659b686dff6601c1a023c68\jetified-ui_legacy-8.12.0\res\layout\list_preference_layout.xml:43: AAPT: warn: generated id 'android:id/widget_frame' for external package 'android'.
C:\Users\Diego\Desktop\Kaiser\app\src\main\res\layout\activity_main.xml:10: AAPT: error: resource drawable/mas (aka com.kaiser:drawable/mas) 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 9s
8 actionable tasks: 1 executed, 7 up-to-date
i've allready try "Clean & Rebuild Project", "Invalidate Cache and Restart", "Deleting the cache folder under .gradle" "org.gradle.jvmargs=-Xmx4608m on the Grade.Property", "Advanved profiling is Disable"
I'm out of ideas (Except, maybe to burn the entire building down.. :( )
You have to open all your xml files and see if there are any errors. Fix the errors then run again. It took my hours to figure it out.
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
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!
After about half a year of not working on the project, I had to open it up to do some minor changes. However upon opening the project without any issues, I get the following log message when trying to run it on my emulator:
GPBI: {"kind":"error","text":"PARSE ERROR:","sources":[{}]}
AGPBI: {"kind":"error","text":"class name (yifu/theindiestation/com/yifu/BuildConfig) does not match path (Yifu/theindiestation/com/Yifu/BuildConfig.class)","sources":[{}]}
AGPBI: {"kind":"error","text":"...while parsing Yifu/theindiestation/com/Yifu/BuildConfig.class","sources":[{}]}
AGPBI: {"kind":"error","text":"PARSE ERROR:","sources":[{}]}
AGPBI: {"kind":"error","text":"class name (yifu/theindiestation/com/yifu/R) does not match path (Yifu/theindiestation/com/Yifu/R.class)","sources":[{}]}
AGPBI: {"kind":"error","text":"...while parsing Yifu/theindiestation/com/Yifu/R.class","sources":[{}]}
AGPBI: {"kind":"error","text":"PARSE ERROR:","sources":[{}]}
AGPBI: {"kind":"error","text":"class name (yifu/theindiestation/com/yifu/R$anim) does not match path (Yifu/theindiestation/com/Yifu/R$anim.class)","sources":[{}]}
AGPBI: {"kind":"error","text":"...while parsing Yifu/theindiestation/com/Yifu/R$anim.class","sources":[{}]}
AGPBI: {"kind":"error","text":"PARSE ERROR:","sources":[{}]}
AGPBI: {"kind":"error","text":"class name (yifu/theindiestation/com/yifu/R$attr) does not match path (Yifu/theindiestation/com/Yifu/R$attr.class)","sources":[{}]}
AGPBI: {"kind":"error","text":"...while parsing Yifu/theindiestation/com/Yifu/R$attr.class","sources":[{}]}
AGPBI: {"kind":"error","text":"PARSE ERROR:","sources":[{}]}
AGPBI: {"kind":"error","text":"class name (yifu/theindiestation/com/yifu/R$bool) does not match path (Yifu/theindiestation/com/Yifu/R$bool.class)","sources":[{}]}
AGPBI: {"kind":"error","text":"...while parsing Yifu/theindiestation/com/Yifu/R$bool.class","sources":[{}]}
AGPBI: {"kind":"error","text":"PARSE ERROR:","sources":[{}]}
AGPBI: {"kind":"error","text":"class name (yifu/theindiestation/com/yifu/R$color) does not match path (Yifu/theindiestation/com/Yifu/R$color.class)","sources":[{}]}
AGPBI: {"kind":"error","text":"...while parsing Yifu/theindiestation/com/Yifu/R$color.class","sources":[{}]}
AGPBI: {"kind":"error","text":"PARSE ERROR:","sources":[{}]}
AGPBI: {"kind":"error","text":"class name (yifu/theindiestation/com/yifu/R$dimen) does not match path (Yifu/theindiestation/com/Yifu/R$dimen.class)","sources":[{}]}
AGPBI: {"kind":"error","text":"...while parsing Yifu/theindiestation/com/Yifu/R$dimen.class","sources":[{}]}
AGPBI: {"kind":"error","text":"PARSE ERROR:","sources":[{}]}
AGPBI: {"kind":"error","text":"class name (yifu/theindiestation/com/yifu/R$drawable) does not match path (Yifu/theindiestation/com/Yifu/R$drawable.class)","sources":[{}]}
AGPBI: {"kind":"error","text":"...while parsing Yifu/theindiestation/com/Yifu/R$drawable.class","sources":[{}]}
AGPBI: {"kind":"error","text":"PARSE ERROR:","sources":[{}]}
AGPBI: {"kind":"error","text":"class name (yifu/theindiestation/com/yifu/R$id) does not match path (Yifu/theindiestation/com/Yifu/R$id.class)","sources":[{}]}
AGPBI: {"kind":"error","text":"...while parsing Yifu/theindiestation/com/Yifu/R$id.class","sources":[{}]}
AGPBI: {"kind":"error","text":"PARSE ERROR:","sources":[{}]}
AGPBI: {"kind":"error","text":"class name (yifu/theindiestation/com/yifu/R$integer) does not match path (Yifu/theindiestation/com/Yifu/R$integer.class)","sources":[{}]}
AGPBI: {"kind":"error","text":"...while parsing Yifu/theindiestation/com/Yifu/R$integer.class","sources":[{}]}
AGPBI: {"kind":"error","text":"PARSE ERROR:","sources":[{}]}
AGPBI: {"kind":"error","text":"class name (yifu/theindiestation/com/yifu/R$layout) does not match path (Yifu/theindiestation/com/Yifu/R$layout.class)","sources":[{}]}
AGPBI: {"kind":"error","text":"...while parsing Yifu/theindiestation/com/Yifu/R$layout.class","sources":[{}]}
AGPBI: {"kind":"error","text":"PARSE ERROR:","sources":[{}]}
AGPBI: {"kind":"error","text":"class name (yifu/theindiestation/com/yifu/R$mipmap) does not match path (Yifu/theindiestation/com/Yifu/R$mipmap.class)","sources":[{}]}
AGPBI: {"kind":"error","text":"...while parsing Yifu/theindiestation/com/Yifu/R$mipmap.class","sources":[{}]}
AGPBI: {"kind":"error","text":"PARSE ERROR:","sources":[{}]}
AGPBI: {"kind":"error","text":"class name (yifu/theindiestation/com/yifu/R$string) does not match path (Yifu/theindiestation/com/Yifu/R$string.class)","sources":[{}]}
AGPBI: {"kind":"error","text":"...while parsing Yifu/theindiestation/com/Yifu/R$string.class","sources":[{}]}
AGPBI: {"kind":"error","text":"PARSE ERROR:","sources":[{}]}
AGPBI: {"kind":"error","text":"class name (yifu/theindiestation/com/yifu/R$style) does not match path (Yifu/theindiestation/com/Yifu/R$style.class)","sources":[{}]}
AGPBI: {"kind":"error","text":"...while parsing Yifu/theindiestation/com/Yifu/R$style.class","sources":[{}]}
AGPBI: {"kind":"error","text":"PARSE ERROR:","sources":[{}]}
AGPBI: {"kind":"error","text":"class name (yifu/theindiestation/com/yifu/R$styleable) does not match path (Yifu/theindiestation/com/Yifu/R$styleable.class)","sources":[{}]}
AGPBI: {"kind":"error","text":"...while parsing Yifu/theindiestation/com/Yifu/R$styleable.class","sources":[{}]}
AGPBI: {"kind":"error","text":"15 errors; aborting","sources":[{}]}
:app:transformClassesWithDexForDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/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.
BUILD FAILED
Total time: 8.863 secs
I completely understand what "does not match path" means, but the thing is that I never changed the folders or whatsoever. I've tried cleaning and rebuilding the project several times, updated Genymotion, but still to no avail. Where can I start looking next?
Thanks!