1

Trying to load 3DLUT script and java code from google, but the build failed with compiler generated file ScriptC_colorcube.java.

Note I've changed int4 to uint4 in line 60 through 66. Following is the error I recived while building it. The problematic line is at the firstline.

error: cannot find symbol method getPointerSize()

Generated code

    public void invoke_setCube(Allocation c) {
        FieldPacker setCube_fp = new FieldPacker((RenderScript.getPointerSize() == 8) ? 32 : 4);
        setCube_fp.addObj(c);
        invoke(mExportFuncIdx_setCube, setCube_fp);
    }

1 Answers1

1

The problem seems to be android gradle, after some investigation, I found there is some warning(warning: Linking two modules of different data layouts: ...) before the error.

I searched online and solved by removing renderscriptSupportModeEnabled true in the gradle file.

I also changed all android.support.v8.renderscript.* to android.renderscript.*

  • Works for me, thanks. Could you please explain why do this ? – Corey Jan 08 '19 at 08:26
  • 1
    Hi, My understanding is that `android.support.v8...` and `android.renderscript.*` are different modules, and have different implementation, and `android.support.v8` provides better compatibility. Also I'm not sure why but the output of this method is different from 3rd party CPU only 3DLUT module, and cannot be explained with precision difference. – user2660324 Jan 10 '19 at 19:54