Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find method android.widget.ImageView.<init>, referenced from method pl.droidsonroids.gif.GifImageView.<init> #197

Closed
SyllaJay opened this issue Aug 4, 2015 · 7 comments

Comments

@SyllaJay
Copy link

SyllaJay commented Aug 4, 2015

08-03 18:34:05.054: I/dalvikvm(10000): Could not find method android.widget.ImageView., referenced from method pl.droidsonroids.gif.GifImageView.
08-03 18:34:05.054: W/dalvikvm(10000): VFY: unable to resolve direct method 8772: Landroid/widget/ImageView;. (Landroid/content/Context;Landroid/util/AttributeSet;II)V
08-03 18:34:05.054: D/dalvikvm(10000): VFY: replacing opcode 0x70 at 0x0000

@SyllaJay
Copy link
Author

SyllaJay commented Aug 4, 2015

I got a crash "shutting down VM", the log above is the only log I get. Does anyone can help?

@koral--
Copy link
Owner

koral-- commented Aug 4, 2015

That log fragment does not contain an error. It is just an information when run on pre-Lollipop that some methods are unavailable.
Try disabling logcat filters.

@koral--
Copy link
Owner

koral-- commented Sep 5, 2015

Closing due to inactivity, can be reopened if more info is provided.

@koral-- koral-- closed this as completed Sep 5, 2015
@novan-p-simanjuntak
Copy link

This happened in v1.1.12 for os KitKat (I test it using LG G Flex and XiaoMi RedMi 2).
It works normally in Samsung Galaxy Tab S (Lollipop)

My current solution is to change the version to v1.1.11 and it works perfectly.

@koral-- koral-- reopened this Jan 25, 2016
@koral--
Copy link
Owner

koral-- commented Jan 25, 2016

OK, I'll check this.

@koral--
Copy link
Owner

koral-- commented Jan 25, 2016

@novan-p-simanjuntak do you have stacktrace and/or code snippet reproducing this issue?
Indeed there is a constructor GifImageView(Context context, AttributeSet attrs, int defStyle, int defStyleRes) which uses API available since Lollipop but it is annotated @TargetApi(Build.VERSION_CODES.LOLLIPOP) and should not be used on lower API levels. It is not called anywhere inside library. If your code calls it without check for current api level lint error should be raised.

@koral--
Copy link
Owner

koral-- commented Feb 6, 2016

With no more info I assume that calling mentioned constructor from your code is the reason. Problem is not located in library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants