List of devices on which Renderscript doesn't

2019-06-25 05:07发布

问题:

My app needs Renderscript since it performs some image processing that would take several seconds in Java. Before publishing I have tested it on a number of devices, even some older models (e.g. Samsung Galaxy Tab 2, API 17), and the app worked quite well, even on these devices. From this, I didn't see a reason to set the minimum API higher than 17. Now, some weeks after publishing on Google Play I see that the app crashes on certain devices such as Galaxy S3 (m0) with API 17 or Galaxy S3 Mini Value Edition (goldenvess3g) with API 18.

 android.support.v8.renderscript.s: Error loading RS jni library: java.lang.UnsatisfiedLinkError: unknown failure

As such that is not surprising, since I knew about certain processor types that do not support Renderscript or other device specific issues that can cause problems. Questions:

  1. Is there a (approximative) way to find out, which of the 6'811 Android devices with API >= 17 do NOT support Renderscript? For example based on the terms in brackets (m0, goldenvess3g) which are possibly related to processor types? If so, I could exclude these devices on Google Play.
  2. If there is no such possibility, would you recommend to set minimum API higher, e.g. API 19? Sounds naive, but I didn't find consistent info on this.

Thanks a lot for your feedback.

回答1:

According to android.renderscript documentation, it is available since API level 11. Since your min API level is 17, I would recommend to use it instead of android.support.v8.renderscript.

Support library APIs are meant to be used if one is targeting devices running lower versions of Android, which, apparently, is not the case for you.