Android webview using GSAP: Attempt to remove non-

2019-02-05 14:18发布

问题:

In Android Studio 1.4 using the Nexus5 emulator, every time there is a 3D animation (x, y, rotationX, rotationY, rotationZ) using GSAP in the webview, the logcat spits out a ton of this message:

Attempt to remove non-JNI local reference, dumping thread

This doesn't appear to affect my webapp's behavior other than a bit of stuttering when the message is produced, which is multiple times a second for animations that take a few seconds to complete.

Any ideas on how to stop, or is this even a problem?

UPDATE: The error does not occur on my test device, Samsung Galaxy S4. So it is likely only an emulator problem.

回答1:

I think you are using a webview without a host GPU emulation.

Google team says in the issue:

"You shouldn't expect that WebView will be usable without host GPU emulation any time soon.

Note also that since the emulator doesn't receive WebView updates, testing on the emulator means you are using a much older version of WebView than the vast majority of your users, and so it's already rather unrepresentative. :/"

Check the issue report:

*https://code.google.com/p/android/issues/detail?id=189040