Skip to main content

All Questions

2 votes
0 answers
297 views

PNG generated from XML not found in drawable folder

I’m working on a project with minSdk 23 and compileSDK 31. I’m seeing an issue when running the app on API 23 where when loading a vector resource via ImageVector.vectorResource(id = R.drawable....
Kyle 's user avatar
  • 705
1 vote
0 answers
424 views

VectorDrawables are not working on android prior api 21 (although compat vectors are enabled)

I have following in my app: // Config defaultConfig { vectorDrawables.useSupportLibrary = true } // Activity public abstract class BaseActivity<T extends ViewDataBinding> extends ...
prom85's user avatar
  • 17.5k
1 vote
1 answer
396 views

VectorDrawableCompat from file

Has anyone successfully loaded a VectorDrawableCompat from a xml file (not in the apk - e.g. downloaded) I tried several things (e.g. via createFromStream) - but all of them failed - I can only load ...
ligi's user avatar
  • 39.3k
1 vote
2 answers
4k views

Drawable abc_vector_test resource not found exception for Kitkat and below

This is my stacktrace when I am running my app on Kitkat or below versions FATAL EXCEPTION: main Process: com.threesixteen.app, ...
saurabhlahoti's user avatar
9 votes
4 answers
2k views

Android Nougat cannot show certain vector files (Resources$NotFoundException)

I have been working on an app that contains a number of vector graphics. Recently I started testing it on Nougat and found it crashing immediately. The logcat shows a Resources$NotFoundException ...
Emilie's user avatar
  • 275
2 votes
1 answer
3k views

Using VectorDrawable from resources in code [duplicate]

Wanted to ask. What is the right way to use VectorDrawable from resources? with support library compile 'com.android.support:support-v4:25.1.1' Because getDrawable() is deprecated and when I use ...
Twinkle_Monkey's user avatar
3 votes
3 answers
6k views

Error inflating class android.support.v7.widget.AppCompatTextView

I'm developing a simple example for Vector Drawable. I used the backward compatible library com.android.support:appcompat-v7:25.1.1 for pre-Lollipop device support. The views used in the layout are: ...
blackjack's user avatar
  • 585
47 votes
5 answers
66k views

Android vectorDrawables.useSupportLibrary = true is stopping app

If I use vectorDrawables.useSupportLibrary = true in gradle then run the app it stopped unfortunately. If I remove vectorDrawables.useSupportLibrary = true the app works. My gradle: apply plugin: '...
Alexander's user avatar
  • 1,760
6 votes
2 answers
5k views

How to properly use backwards compatible Vector Drawable with the latest Android Support Library?

Vector drawable has been added to Support Library not so long time ago and there were a lot of changes in the API since then: Gradle flags, initializer blocks, selectors, custom XML attributes etc. ...
Maksim Ostrovidov's user avatar
1 vote
2 answers
3k views

How to use tint for vector drawable in compatibility mode? [duplicate]

I'm trying to apply tint for ImageButton that uses vector drawable: <android.support.v7.widget.AppCompatImageButton android:id="@+id/flashlight_button" app:srcCompat="@...
Alexey Zakharov's user avatar
4 votes
0 answers
160 views

How to set an AAPT flag in Eclipse?

I am using Eclipse for Android development, instead of Android Studio. (I have my reasons; I can't use AS at the moment.) Now I need to use VectorDrawableCompat at the moment. As mentioned in the ...
Solace's user avatar
  • 8,872
1 vote
1 answer
4k views

How to use VectorDrawableCompat from the AppCompat library?

I initially wrote this SSCCE with a minsdkversion of 21 (Lollipop), and it worked fine. But my need is to use a VectorDrawableCompat in pre-lollipop. In the SSCCE, there is an ImageView in the XML ...
Solace's user avatar
  • 8,872
3 votes
3 answers
2k views

Resources$NotFoundException for ImageView with vector drawable

I've got crash - Resources$NotFoundException for a vector drawable upon activity creation. Crashes on pre-21. Android Studio 2.1 Support library 24.0.0 Gradle plugin 2.1.0 targetSdk 23 minSdk 15 ...
WindRider's user avatar
  • 12.2k
4 votes
1 answer
2k views

How can I use vectorDrawable as icon for push notifications using Android Support Library 23.2? setSmallIcon gives error

My app is under API < v21, so I use Android Support Library 23.2 for managing my vectorDrawables. android { defaultConfig { vectorDrawables.useSupportLibrary = true } } All ...
Yuliia Ashomok's user avatar
7 votes
1 answer
1k views

Why do I still have png's after implementing vector drawable support library?

Pretty much what the title says. I have 2 png's outside of pure xml files for vector drawables and I'm using the vector drawable support library. android { ... defaultConfig { ... ...
iHowell's user avatar
  • 2,343

15 30 50 per page