Reputation: 8680
I've just updated Android Studio to 2.2
, Gradle plugin to 2.2.0
and I am getting the following error in the project when initializing views using DataBinding
. It says Type T has incompatible upper bounds
. Android Studio offers no suggestions on how to fix this. Casting the binding to the exact class doesn't solve the issue.
It still compiles and runs though, but project is full of red errors - one for each DataBinding
initialization. Any ideas?
Upvotes: 2
Views: 1565
Reputation: 1885
With Android Studio 2.2 - I had to do Maksim's solution + executing ./gradlew
in the terminal to make the .gradle directory pull the 3.1 gradle version in order to make everything work.
Upvotes: 0
Reputation: 421
Upvotes: 6
Reputation: 5789
My project is working.
private LoadImageByPicassoBinding mBinding;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
//mBinding = LoadImageByPicassoBinding.inflate(inflater, container, false);
mBinding = DataBindingUtil.inflate(inflater, R.layout.load_image_by_picasso, container, false);
return mBinding.getRoot();
}
Upvotes: 0