0

I made an app on a Motorola Moto E 4G (2nd gen), using Renderscript. I needed a wide-angle camera for my project so I just bought a LG G6. However, my app crashes on the LG G6 when I launch it. It crashes when I call a Renderscript kernel.

Also, since performance is important in my case, I display the time it took to make one cycle on the screen. On the Motorola, when not doing the image processing, this takes +/- 45 ms. However the LG G6 is less regular with sometimes peaks at +150 ms. This is strange because the Motorola is way less powerful than the LG (Snapdragon 200, 1GB RAM vs. Snapdragon 821, 4GB RAM). Is there an explanation for this (and maybe how to solve it)?

The Motorola runs at API 23, Android 6.0 and the LG at API 26, Android 8.0.0.

karel
  • 5,489
  • 46
  • 45
  • 50
Anton
  • 137
  • 2
  • 14
  • Which Renderscript are you using? The framework version or the support version? – Morrison Chang Mar 08 '19 at 15:55
  • The support version – Anton Mar 08 '19 at 15:56
  • If your minSDK is high enough, try the framework version and see if your problems persist. From comments in: [List of devices on which Renderscript doesn't work](https://stackoverflow.com/q/34642793/295004) – Morrison Chang Mar 08 '19 at 15:58
  • I changed all my 'import android.support...' To 'import android.renderscript...'. But how do you initialize a script with the framework? mScript = new ScriptC_imageProc(rs); says error: incompatible types: android.renderscript.Renderscript cannot be converted to android.suplort.v8.renderscript.Renderscript – Anton Mar 08 '19 at 16:16
  • I would clean the project to make sure the `.rs` files are recompiled. – Morrison Chang Mar 08 '19 at 16:21
  • I did the following: sync project with gradle files, clean project, build project. I still get the error... – Anton Mar 08 '19 at 16:23

0 Answers0