Android data binding error -- java.lang.RuntimeException: view tag isn't correct on view:null -
me , teammate working on same project and
both using android studio 2.3 , gradle 3.3
have used databinding in code , works correctly:
gradle:
... android { ... databinding { enabled = true } } ...
my_view.xml:
<layout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <relativelayout> .... </relativelayout> </layout>
myclass.java:
public class myclass extends toolbar { private myviewbinding binding; ... @override protected void onfinishinflate() { super.onfinishinflate(); initializeview(); } private void initializeview() { this.binding = databindingutil.inflate(layoutinflater.from(getcontext()), r.layout.my_view,this, true); ... } }
as said works correctly me teammate android studio shows error: android studio java.lang.runtimeexception: view tag isn't correct on view:null
please guid how can fix it?
Comments
Post a Comment