Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Canot resolve android.support.v7.internal.widget.TintImageView

I tried to set compileSdkVersion in my project to 23 and also updated the below libraries:

  • com.android.support:appcompat-v7:23.1.1
  • com.android.support:recyclerview-v7:23.1.1
  • com.android.support:cardview-v7:23.1.1

Since then I am getting error at importing android.support.v7.internal.widget.TintImageView

Can anyone please tell me why is it so? Any change in the package of TintImageView? Kindly help.

I am using Studio Preview 2.0

like image 219
Jayakrishnan Salim Avatar asked Dec 21 '15 08:12

Jayakrishnan Salim


1 Answers

It happens because the class

android.support.v7.internal.widget.TintImageView

doesn't exist in the appcompat v 23.x.x.

In general don't use the classes in the internal package.

You can check the source in the folder androidsdk\extras\android\m2repository\com\android\support\appcompat-v7\.

You should switch to the AppCompatImageView.

A ImageView which supports compatible features on older version of the platform, including:

  • Allows dynamic tint of it background via the background tint methods in ViewCompat.
  • Allows setting of the background tint using backgroundTint and backgroundTintMode.

This will automatically be used when you use ImageView in your layouts. You should only need to manually use this class when writing custom views.

like image 62
Gabriele Mariotti Avatar answered Sep 22 '22 06:09

Gabriele Mariotti