I am following a tutorial to create a render script. I am using Android studio for this purpose. The link to the tutorial is given below:
http://code.tutsplus.com/tutorials/getting-started-with-renderscript-on-android--mobile-9154
The problem I am facing is that it does not support the renderscript that I have written as AndroidStudio throws following error:
/Users/user-name/AndroidStudioProjects/projectName/app/build/generated/source/rs/debug/com/projectName/src/ScriptC_snow.java
Error:(52, 13) error: cannot find symbol class Mesh
Error:(53, 43) error: cannot find symbol class Mesh
Error:(58, 12) error: cannot find symbol class Mesh
Error:(43, 25) error: cannot find symbol method MESH(RenderScript)
I already tried adding a the following line,
renderscriptSupportModeEnabled true
to my build.gradle, but this only resolves few issues but not all. In the tutorial s_mesh class is used in RenderScript file and when AndroidStudio creates a java implementation of that its unable to find the class Mesh.
Can anyone please help me out fix this issue in Android Studio. Thanks in Advance!
That tutorial is a bit outdated. The RenderScript support library (which you enabled with that flag) doesn't have the Mesh class, because it was deprecated as part of the graphics API. You may want to look at https://thenewcircle.com/s/post/1557/a_deep_dive_into_renderscript_andevcon or a just the RenderScript documentation on developer.android.com instead. There are also a few examples online of working apps that use the support library.