oli107 / material-range-bar

Android widget for selecting a range of values.
Apache License 2.0
1.68k stars 370 forks source link

Failed linking file resources after upgrading to v1.4 #122

Closed adiga-maf closed 6 years ago

adiga-maf commented 6 years ago

Hello,

I upgraded my dependency to 1.4 following library documentation and got the following when syncing my project:

Error:(65) error: attribute 'com.mypackage:barWeight' not found.
Error:(65) error: attribute 'com.mypackage:barWeight:connectingLineColor' not found.
Error:(65) error: attribute 'com.mypackage:barWeight:connectingLineWeight' not found.
Error:(65) error: attribute 'com.mypackage:barWeight:pinColor' not found.
Error:(65) error: attribute 'com.mypackage:barWeight:pinMaxFont' not found.
Error:(65) error: attribute 'com.mypackage:barWeight:rangeBarColor' not found.
Error:(65) error: attribute 'com.mypackage:barWeight:selectorColor' not found.
Error:(65) error: attribute 'com.mypackage:barWeight:selectorSize' not found.
Error:(65) attribute 'com.mypackage:barWeight:barWeight' not found.
Error:(65) attribute 'com.mypackage:barWeight:connectingLineColor' not found.
Error:(65) attribute 'com.mypackage:barWeight:connectingLineWeight' not found.
Error:(65) attribute 'com.mypackage:barWeight:pinColor' not found.
Error:(65) attribute 'com.mypackage:barWeight:pinMaxFont' not found.
Error:(65) attribute 'com.mypackage:barWeight:rangeBarColor' not found.
Error:(65) attribute 'com.mypackage:barWeight:selectorColor' not found.
Error:(65) attribute 'com.mypackage:barWeight:selectorSize' not found.
Error:failed linking file resources.
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Execution failed for task ':app:processDebugResources'.
> Failed to execute aapt

My xml for the rangebar is:

<com.appyvet.rangebar.RangeBar
        android:id="@+id/rb_field"
        android:layout_width="match_parent"
        android:layout_height="@dimen/xxxlarge_margin"
        app:barWeight="8dp"
        app:connectingLineColor="@color/blue_green"
        app:connectingLineWeight="5dp"
        app:pinColor="@color/blue_green"
        app:pinMaxFont="14sp"
        app:rangeBarColor="@color/range_bar_color"
        app:selectorColor="@color/bt_very_light_gray"
        app:selectorSize="10dp" />

When reverting back to v1.3 it worked but I need the latest bug fixes for this library. Please help with this.

Thanks

krazykira commented 6 years ago

Hi @adiga-maf,

In Version 1.4 the all the attributes have mrb_ prefix. i advise that you read the Readme.md file. it will solve your problem

adiga-maf commented 6 years ago

That worked. Sorry, But I checked the Readme.md file before and did not found any update. Maybe a sync/connection issue.

jaydeepbhayani commented 6 years ago

Even I faced the same problem , and i got this solution ,

Go to your

gradle.properties

write the below code and Sync your project

android.enableAapt2=false

edsna commented 6 years ago

That solved my bug thank you.

Thanusyia commented 5 years ago

android.enableAapt2=false

rgherta commented 5 years ago

android.enableAapt2=false

WARNING: The following project options are deprecated and have been removed: android.enableAapt2 This property has no effect, AAPT2 is now always used. Affected Modules: app

krazykira commented 5 years ago

@rgherta please take a look at Readme.md

In Version 1.4 and above the all the attributes have mrb_ prefix.

rgherta commented 5 years ago

@rgherta please take a look at Readme.md

In Version 1.4 and above the all the attributes have mrb_ prefix.

I stand corrected. Thank you