ZieIony / Carbon

Material Design implementation for Android 4.0+. Shadows, ripples, vectors, fonts, animations, widgets, rounded corners and more.

Home Page:https://androidreclib.wordpress.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Data Binding error after adding carbon

devrajhike opened this issue · comments

e: [kapt] An exception occurred: android.databinding.tool.util.LoggedErrorException: Found data binding errors.
****/ data binding error ****msg:Cannot find the setter for attribute 'android:background' with parameter type int on android.support.v7.widget.CardView. file:/Users/devrajchouhan/AndroidStudioProjects/MyApplication/android-client/app/src/main/res/layout/shop_pack_detail.xml loc:16:30 - 16:73 ****\ data binding error ****
****/ data binding error ****msg:Cannot find the setter for attribute 'android:background' with parameter type int on android.widget.RelativeLayout. file:/Users/devrajchouhan/AndroidStudioProjects/MyApplication/android-client/app/src/main/res/layout/sticker_settings_list_item.xml loc:16:26 - 16:69 ****\ data binding error ****
****/ data binding error ****msg:Cannot find the setter for attribute 'android:background' with parameter type int on android.widget.LinearLayout. file:/Users/devrajchouhan/AndroidStudioProjects/MyApplication/android-client/app/src/main/res/layout/conv_empty_search_view.xml loc:13:30 - 13:73 ****\ data binding error ****
****/ data binding error ****msg:Cannot find the setter for attribute 'android:background' with parameter type int on android.widget.RelativeLayout. file:/Users/devrajchouhan/AndroidStudioProjects/MyApplication/android-client/app/src/main/res/layout/sticker_shop_input_v2.xml loc:11:30 - 11:73 loc:23:38 - 23:81 ****\ data binding error ****
****/ data binding error ****msg:Cannot find the setter for attribute 'android:background' with parameter type int on android.widget.LinearLayout. file:/Users/devrajchouhan/AndroidStudioProjects/MyApplication/android-client/app/src/main/res/layout-land/search_empty_view.xml loc:10:26 - 10:69 ****\ data binding error ****
****/ data binding error ****msg:Cannot find the setter for attribute 'android:background' with parameter type int on android.widget.LinearLayout. file:/Users/devrajchouhan/AndroidStudioProjects/MyApplication/android-client/app/src/main/res/layout/search_empty_view.xml loc:12:30 - 12:73 ****\ data binding error ****
****/ data binding error ****msg:Could not resolve handler::onAddNameClick as a listener. file:/Users/devrajchouhan/AndroidStudioProjects/MyApplication/android-client/app/src/main/res/layout/profile_fragment.xml loc:91:39 - 91:61 ****\ data binding error ****
****/ data binding error ****msg:Cannot find the setter for attribute 'android:background' with parameter type int on android.widget.RelativeLayout. file:/Users/devrajchouhan/AndroidStudioProjects/MyApplication/android-client/app/src/main/res/layout/sticker_shop_v2.xml loc:10:26 - 10:69 ****\ data binding error ****
****/ data binding error ****msg:Cannot find the setter for attribute 'android:src' with parameter type android.graphics.drawable.Drawable on android.widget.ImageView. file:/Users/devrajchouhan/AndroidStudioProjects/MyApplication/android-client/app/src/main/res/layout/view_my_points.xml loc:24:23 - 24:127 ****\ data binding error ****
****/ data binding error ****msg:Cannot find the setter for attribute 'android:background' with parameter type int on android.widget.LinearLayout. file:/Users/devrajchouhan/AndroidStudioProjects/MyApplication/android-client/app/src/main/res/layout/sticker_shop_download_failed.xml loc:11:26 - 11:69 ****\ data binding error ****
****/ data binding error ****msg:Cannot find the setter for attribute 'android:background' with parameter type int on android.support.constraint.ConstraintLayout. file:/Users/devrajchouhan/AndroidStudioProjects/MyApplication/android-client/app/src/main/res/layout/shop_pack_detail_v2.xml loc:26:34 - 26:77 ****\ data binding error ****
****/ data binding error ****msg:Cannot find the setter for attribute 'android:background' with parameter type int on android.widget.FrameLayout. file:/Users/devrajchouhan/AndroidStudioProjects/MyApplication/android-client/app/src/main/res/layout/pack_preview_not_allowed.xml loc:12:26 - 12:69 ****\ data binding error ****
****/ data binding error ****msg:Cannot find the setter for attribute 'android:onClick' with parameter type lambda on android.widget.RelativeLayout. file:/Users/devrajchouhan/AndroidStudioProjects/MyApplication/android-client/app/src/main/res/layout/mute_by_member_fragment.xml loc:25:27 - 25:71 ****\ data binding error ****
****/ data binding error ****msg:Cannot find the setter for attribute 'android:background' with parameter type int on android.widget.TextView. file:/Users/devrajchouhan/AndroidStudioProjects/MyApplication/android-client/app/src/main/res/layout/view_campaign.xml loc:42:38 - 42:91 ****\ data binding error ****
****/ data binding error ****msg:Cannot find the setter for attribute 'android:background' with parameter type int on android.widget.RelativeLayout. file:/Users/devrajchouhan/AndroidStudioProjects/MyApplication/android-client/app/src/main/res/layout/sticker_shop.xml loc:10:26 - 10:69 ****\ data binding error ****
****/ data binding error ****msg:Cannot find the setter for attribute 'android:background' with parameter type int on android.widget.LinearLayout. file:/Users/devrajchouhan/AndroidStudioProjects/MyApplication/android-client/app/src/main/res/layout/share_container.xml loc:11:26 - 11:69 ****\ data binding error ****
****/ data binding error ****msg:Cannot find the setter for attribute 'android:background' with parameter type int on android.widget.FrameLayout. file:/Users/devrajchouhan/AndroidStudioProjects/MyApplication/android-client/app/src/main/res/layout/sticker_settings.xml loc:16:26 - 16:69 ****\ data binding error ****
****/ data binding error ****msg:Cannot find the setter for attribute 'android:background' with parameter type int on android.widget.LinearLayout. file:/Users/devrajchouhan/AndroidStudioProjects/MyApplication/android-client/app/src/main/res/layout/sticker_shop_loading.xml loc:10:26 - 10:69 ****\ data binding error ****
****/ data binding error ****msg:Cannot find the setter for attribute 'android:background' with parameter type int on android.support.constraint.ConstraintLayout. file:/Users/devrajchouhan/AndroidStudioProjects/MyApplication/android-client/app/src/main/res/layout/shop_input_layout.xml loc:15:30 - 15:73 ****\ data binding error ****
****/ data binding error ****msg:Cannot find the setter for attribute 'android:onClick' with parameter type lambda on android.widget.RelativeLayout. file:/Users/devrajchouhan/AndroidStudioProjects/MyApplication/android-client/app/src/main/res/layout/mute_by_time_fragment.xml loc:42:27 - 42:75 ****\ data binding error ****
****/ data binding error ****msg:Cannot find the setter for attribute 'android:background' with parameter type int on android.widget.RelativeLayout. file:/Users/devrajchouhan/AndroidStudioProjects/MyApplication/android-client/app/src/main/res/layout/pack_preview.xml loc:17:30 - 17:73 loc:37:34 - 37:77 ****\ data binding error ****
****/ data binding error ****msg:Cannot find the setter for attribute 'android:background' with parameter type int on android.view.View. file:/Users/devrajchouhan/AndroidStudioProjects/MyApplication/android-client/app/src/main/res/layout/all_updated_message.xml loc:11:26 - 11:69 ****\ data binding error ****
****/ data binding error ****msg:Cannot find the setter for attribute 'android:background' with parameter type int on android.view.View. file:/Users/devrajchouhan/AndroidStudioProjects/MyApplication/android-client/app/src/main/res/layout-land/all_updated_message.xml loc:10:26 - 10:69 ****\ data binding error ****
****/ data binding error ****msg:Cannot find the setter for attribute 'android:onClick' with parameter type lambda on android.widget.RelativeLayout. file:/Users/devrajchouhan/AndroidStudioProjects/MyApplication/android-client/app/src/main/res/layout/custom_mute_fragment.xml loc:49:27 - 49:71 ****\ data binding error ****
****/ data binding error ****msg:Cannot find the setter for attribute 'android:src' with parameter type android.graphics.drawable.StateListDrawable on com.bsb.hike.core.view.RecyclingImageView. file:/Users/devrajchouhan/AndroidStudioProjects/MyApplication/android-client/app/src/main/res/layout/sticker_shop_list_item.xml loc:38:27 - 38:113 ****\ data binding error ****
****/ data binding error ****msg:Cannot find the setter for attribute 'android:background' with parameter type int on android.widget.RelativeLayout. file:/Users/devrajchouhan/AndroidStudioProjects/MyApplication/android-client/app/src/main/res/layout/hikelistactivity.xml loc:9:26 - 9:69 ****\ data binding error ****
****/ data binding error ****msg:Cannot find the setter for attribute 'android:background' with parameter type int on android.support.constraint.ConstraintLayout. file:/Users/devrajchouhan/AndroidStudioProjects/MyApplication/android-client/app/src/main/res/layout/hike_navigation_layout.xml loc:26:30 - 26:73 ****\ data binding error ****

Your issue doesn't seem to be connected to Carbon as these errors are rather common and revolve around standard Android attributes. Did you try refreshing cache/project after integrating Carbon? See: https://stackoverflow.com/questions/44594475/listener-binding-cannot-find-the-setter

Getting this after adding dependency of Carbon only , Clearing cache or deleting tmp file doesn't help.

Could you share your code or prepare a minimal example project showing your issue?

Please don't close issues without any explanation. Every issue can be helpful for others getting the same error.

Faced with the same problem. Just added carbon to my project and now i have plenty of databinding errors

Where could I access that project? If that's not possible, could you prepare a minimal working example of your issue? That could help me investigate it as I cannot reproduce it in my projects.

Where could I access that project? If that's not possible, could you prepare a minimal working example of your issue? That could help me investigate it as I cannot reproduce it in my projects.

Unfortunately no. It's a big private project with a lot of binding adapters.

Well, so let's try to guess.

Maybe this is an issue with conflicting databinding setup? Since certain version of Gradle there's no need to add databinding manually. There's that single declaration in android plugin and Gradle automatically imports neccessary compiler and libraries. Maybe there's a conflict there? You should get the same issue by stripping your project down to config and a single adapter.

Could you post your Gradle wrapper and android plugin versions? Are you doing anything besides databindingEnabled = true in your build.gradle?

androidPluginVersion = '3.1.2'
gradle 4.6

dataBinding {
enabled = true
}
Nothing special

I wasn't able to reproduce this issue, so I'm unable to help. Android environment is so quirky, that this issue may be caused by anything in the configuration. Please post your solution here if you find the cause.