S
S
sigarew2018-11-13 08:47:58
Android
sigarew, 2018-11-13 08:47:58

In the application, all R. are red, what should I do?

Hello! Such a problem. Started making an app in android studio. Everything was fine, but when I turn on Gradle, after the build is completed, it writes this information:
Android resource linking failed
Output: C:\APP\taxotaxi\app\src\main\res\layout\activity_main.xml:17: error: attribute headerLayout (aka en.taxotaxi:headerLayout) not found.
C:\APP\taxotaxi\app\src\main\res\layout\activity_main.xml:17: error: attribute itemIconTint (aka ru.taxotaxi:itemIconTint) not found.
C:\APP\taxotaxi\app\src\main\res\layout\activity_main.xml:17: error: attribute itemTextColor (aka ru.taxotaxi:itemTextColor) not found.
C:\APP\taxotaxi\app\src\main\res\layout\activity_main.xml:17: error: attribute menu (aka ru.taxotaxi:menu) not found.
error: failed linking file resources.
Command: C:\GR\caches\transforms-1\files-1.1\aapt2-3.2.0-4818971-windows.jar\389e7282e956a050551ad456f374fef3\aapt2-3.2.0-4818971-windows\aapt2.exe link -I\
C: \Android\platforms\android-28\android.jar\
--manifest\
C:\APP\taxotaxi\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
-o\
C:\APP\ taxotaxi\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
-R\
@C:\APP\taxotaxi\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources -debug.ap_.txt\
--auto-add-overlay\
--java\
C:\APP\taxotaxi\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
--custom-package\
ru.taxotaxi\
-0\
apk\
--output-text-symbols\
C:\APP\taxotaxi \app\build\intermediates\symbols\debug\R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.0-4818971-windows Daemon #0
All paths, files are correct. I can't figure out what's wrong. And by the way, after the above information, all R. in MainActivity and SplashActivity are red

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
EugeniaShimak, 2018-11-13
@EugeniaShimak

1) Perhaps the headerLayout, itemIconTint, itemTextColor, menu attributes are somehow spelled incorrectly.
2) Check the compileSdkVersion value in the Build.graddle(modul App) file , and if its value differs from the targetSdkVersion value , change it to the targetSdkVersion value . It helped me once.

M
mister_byt, 2018-11-29
@mister_byt

Problem with layout resource files. Something has moved somewhere, does not match, the id of the elements are duplicated, and so on. You need to check the validity of the values ​​in the layout

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question