-2

I'm trying to build this https://github.com/WLun001/pocket-health-advisor

But I'm getting the following error.

What can I do?

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:processDebugResources'.

Caused by: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed C:\Users\Jarup.gradle\caches\transforms-1\files-1.1\card-form-3.5.0.aar\cb262b69320916545281c54ceaa4ba26\res\values\values.xml:57:5-60:13: AAPT: error: style attribute 'attr/colorError (aka com.example.lun.pocket_health_advisor:attr/colorError)' not found.

Caused by: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed C:\Users\Jarup\AndroidStudioProjects\healthcare\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2493: error: style attribute 'attr/colorError (aka com.example.lun.pocket_health_advisor:attr/colorError)' not found. error: failed linking references.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
premkumar
  • 1
  • 1
  • 2
  • 1
    `colorError` either needs to be defined or removed. search the project for that string. this "question" does not even feature any question, nor a single `?` question mark. using pastebin might be just as useful. – Martin Zeitler Feb 08 '19 at 14:59
  • it is showing me error and not posting it @cricket_007 – premkumar Feb 08 '19 at 15:00
  • yes @MartinZeitler please solve it.it would be very helpful for me – premkumar Feb 08 '19 at 15:16
  • At the very least, please say you didn't edit any of that source code? And why do you think you need to use this specific app, if it isn't yours and the owner doesn't seem interested in even fixing it themselves? ... Even if we can build it, the problem could be only your machine – OneCricketeer Feb 08 '19 at 15:31
  • I had choose this project to submit this project in myclg – premkumar Feb 08 '19 at 15:36
  • @premkumar use `Edit` > `Find` > `Find in Path ...` and enter `colorError` there. you can't just use a color, which had never been defined, else you get an error message alike the one you've posted. it might be referenced in `values/values.xml` or `values/styles.xml`. – Martin Zeitler Feb 08 '19 at 15:42
  • it might be this one issue: https://github.com/WLun001/pocket-health-advisor/issues/6 ...while `errorColor` does not exist in the whole project: https://github.com/WLun001/pocket-health-advisor/search?q=colorError&unscoped_q=colorError ...which makes me believe, you were messing around and were introducing it; it's author is not to blame. just click "revert changes" in Git client - or check out a fresh copy, problem solved. – Martin Zeitler Feb 08 '19 at 15:55
  • What you mean by fresh copy ? – premkumar Feb 08 '19 at 16:10

1 Answers1

0

This problem can be from your libraries. To solve this problem, you can use other versions of the added libraries

Long ago, this happened to me for this

implementation 'com.android.support:appcompat-v7:28.0.0'

Or you can use the following links

how to project clean in the android studio

Amirhf
  • 380
  • 4
  • 16
  • What part of the error says it's a library problem? The package in the error is `com.example`, so that's certainly not a problem with AppCompat – OneCricketeer Feb 08 '19 at 14:07