Ver encuadernación
buildFeatures {
viewBinding true
}
Bad Barracuda
buildFeatures {
viewBinding true
}
<LinearLayout
...
tools:viewBindingIgnore="true" >
...
</LinearLayout>
// Android Studio 4.0android { buildFeatures { viewBinding = true }}
private ResultProfileBinding binding;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ResultProfileBinding.inflate(getLayoutInflater());
View view = binding.getRoot();
setContentView(view);
}
buildFeatures {
viewBinding true
}
android{
...
//for android gradle plugin 3.6 or lower
viewBinding{
enabled true
}
}