Android Guy
Android Guy

Reputation: 1

AAPT2 error: check logs for details and invalid resource type 'attr' for parent of style

I opened project from github and try to run it but it is giving two errors.first error is "invalid resource type 'attr' for parent of style "and second is "aapt2 error: check logs for details". Here is the link of project i was trying to open. https://github.com/PragatiShrivastava06/EventShare_AndroidApp

Here is the errors image

enter image description here

Upvotes: 0

Views: 980

Answers (2)

Izabela Orlowska
Izabela Orlowska

Reputation: 7532

This is because of your dependency on:

compile 'com.klinkerapps:android-chips:1.0.1@aar'

In that AAR's resources they define the style resource named RecipientEditTextView incorrectly:

<style name="RecipientEditTextView" parent="@android:attr/autoCompleteTextViewStyle">

As AAPT2 is saying, a style needs a style resource for its parent, you cannot use an attr.

Contact the owner of that AAR or change to a library that doesn't have this mistake in it.

Upvotes: 2

user4106398
user4106398

Reputation:

It tells you exactly what's wrong.

attr is an invalid resource type for style.

Double click the error and it will bring you to the line that is incorrect.

Upvotes: 1

Related Questions