21

After update to Android Studio 4.0, all my vector icons display wrong on the preview screen. But they look normal after running an application on the device. It concerns all vector icons: imported on the previous version of the Android Studio, imported on the new version, imported from svg file, and imported in Android Studio as clip art.

OS: Ubuntu 18.04.2 LTS

sample of wrong icon

How to fix it?

Oleg Nestyuk
  • 476
  • 2
  • 14

3 Answers3

16

I fixed it by disabling Settings -> Experimental -> Use new Layout Rendering Engine.

Almaz
  • 169
  • 3
6

This is probably because you have a non-default locale (to check run locale in terminal). In particular LC_NUMERIC. If that's the case, to fix the issue run the studio with e.g. LC_NUMERIC="en_US.UTF-8".

Fedor Kudasov
  • 76
  • 1
  • 1
-5

In your build.gradle file

android { 
          defaultConfig
                      {
                           vectorDrawables.useSupportLibrary = true 
                      }
        }

dependencies {  
             compile 'com.android.support:appcompat-v7:23.2.0' 
             }

and use app:srcCompat instead of android:src

Invalid Caches/Restart

then try to create a new drawable vector its should works..

Samer Kasseb
  • 192
  • 3
  • 10