0

I'm trying to achieve what is explaining in the answer of this question:

I've tried duplicating the source files in the working directory but I end up having 48 errors of the type

Method VectorDrawableCompat.mutate() uses package-private field VectorDrawableCommon.mDelegateDrawable

I've also tried to modify directly the source files but it doesn't work. How exactly should I proceed ?

By the way I tried this for api 25 26 and 27, in each case i just modified vectordrawablecompat.

  • Presumably, your copy of `VectorDrawableCompat` is not in the `android.support.graphics.drawable`. That would result in this error. You would need to also copy `VectorDrawableCommon` and put its copy in the same package that has your copy of `VectorDrawableCompat`. – CommonsWare Apr 02 '18 at 14:54
  • This is less of an answer, and more of a suggestion. Do not do this. Try to find another way to do what you are attempting. If that field is not accessible, there is likely a reason for it. If you attempt to modify source and include it in your project, or add a new package in your project to access this method, you will break things as you attempt to update for newer versions of Android. – WoogieNoogie Apr 02 '18 at 15:06
  • I'm not sure I understand. I should modify the files then copy them to my working directory while letting them in source folder ? – Belkachait08 Apr 02 '18 at 15:08
  • @WoogieNoogie It's kind of hard for me to do this. I want to animate a group in a drawable without moving the rest of the drawable. Only other way i can think of to achieve it would be to overlap 2 drawables but then i wouldn't be able to zoom both of them at the same time. – Belkachait08 Apr 02 '18 at 15:10

0 Answers0