# Can't compile RenderScript after updating to Android Studio 4.3 with build-tools 18.1.1

I've been working on a RenderScript project for quite some time now, using older versions of Android Studio. I'm targeting 4.3 with SDK version 18.

I've had run-time issues when compiling the project with new build-tools 19+ (crashes when I modify the root() 'uchar *v_out' parameter), so I decided to go back to build-tools 18.1.1. But when compiling with this version I get the error:

'conversion.rs error: Compute Kernel root() targeting SDK levels 11-13 may not skip parameters FAILURE: Build failed with an exception.

Execution failed for task :test:compileDebugRenderscript. com.android.ide.common.internal.LoggedErrorException: Failed to run command: C:\Program Files\android-studio\sdk\build-tools\18.1.1\llvm-rs-cc.exe -O 3 -I C:\Program Files\android-studio\sdk\build-tools\18.1.1\renderscript\include\ -I C:\Program Files\android-studio\sdk\build-tools\18.1.1\renderscript\clang-include\ ...

Perhaps it's a problem with my kernel function signature? Even with a simple .rs file below, it fails to compile. I used to be able to compile and run this fine and I'm pretty sure it was using build-tools 18 back then..

``````#pragma version(1)
#pragma rs java_package_name(com.app.test);

void root(const uchar4 *in, uchar4 *out, uint32_t x, uint32_t y) {

}
``````

Any help would be greatly appreciated.

Update: This is getting strange... if I use gradle version 1.10 with build-tools 19.0.1, the code compiles but gives me the following error if i try to modify 'uchar4 *out'