Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attribute "android:alpha" has already been defined #81

Closed
xuyisheng opened this issue Dec 31, 2020 · 6 comments · Fixed by #151
Closed

Attribute "android:alpha" has already been defined #81

xuyisheng opened this issue Dec 31, 2020 · 6 comments · Fixed by #151
Assignees
Labels
bug Something isn't working

Comments

@xuyisheng
Copy link

compile with 'androidx.constraintlayout:constraintlayout:2.0.4'

runs error:

Attribute "android:alpha" has already been defined
Attribute "android:translationX" has already been defined
Attribute "android:translationY" has already been defined
Attribute "android:translationZ" has already been defined

@kaeawc
Copy link
Contributor

kaeawc commented Dec 31, 2020

@xuyisheng What version of AGP are you using? Is it older than 3.0.1?

@kaeawc
Copy link
Contributor

kaeawc commented Dec 31, 2020

@xuyisheng or are you trying to pin the versions for both constraintlayout and solver? You cannot use the old solver version with the newer constraintlayout module.

@zxw1962
Copy link

zxw1962 commented Jan 18, 2021

@kaeawc we use AGP 3.2.1 & gradle version 4.6, got the same errors.
Seems the root cause is the "PropertySet" defined in attrs.xml with
attr name="android:alpha" format="float" (I guess the format="float" should be removed here?).
What do you say? Thanks in advance.

@xuyisheng
Copy link
Author

@xuyisheng What version of AGP are you using? Is it older than 3.0.1?

My AGP is 3.2.0,and constraintlayout version of 2.0.4, I have checked version of constraintlayout and solver, it's all right

@xuyisheng
Copy link
Author

Are you making progress ?

@zxw1962
Copy link

zxw1962 commented Jan 29, 2021

Are you making progress ?
image
we use the above version to workaround this error.

@camaelon camaelon added the bug Something isn't working label Feb 26, 2021
@camaelon camaelon assigned jafu888 and camaelon and unassigned jafu888 Feb 26, 2021
camaelon added a commit that referenced this issue Feb 26, 2021
incorrectly set the format for the android:alpha attribute -- we already get it from the platform.

Fixes #81
camaelon added a commit that referenced this issue Feb 26, 2021
incorrectly set the format for the android:alpha attribute -- we already get it from the platform.

Fixes #81
oscar-ad pushed a commit to oscar-ad/constraintlayout that referenced this issue Mar 11, 2021
incorrectly set the format for the android:alpha attribute -- we already get it from the platform.

Fixes androidx#81
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants