简体   繁体   中英

How to generate RenderScript ScriptC* files with Android.bp?

I want to compile my renderscript project with a .rs file on AOSP.

My AOSP SDK is 29 (Android Q).

My build directory for mm is

├── Android.bp
├── AndroidManifest.xml
├── java
├── lib
├── lib64
├── libs
├── res
└── rs
    └── histEq.rs

I have followed How to generate RenderScript ScriptC* files with Android.mk? and tried this corresponding change:

android_app {
    name: "MyAndroidApp",
    manifest: "AndroidManifest.xml",
    srcs: [
        "java/**/*.java",
        "rs/histEq.rs",
    ],

However, I am still getting this build error.

<path to code>/utils/RenderScriptImageEdit.java:11: error: cannot find symbol
import <package name>.ScriptC_histEq;
                            ^
  symbol:   class ScriptC_histEq
  location: package <package name>
<path to code>/utils/RenderScriptImageEdit.java:43: error: cannot find symbol
        ScriptC_histEq histEqScript = new ScriptC_histEq(rs);
        ^
  symbol:   class ScriptC_histEq
  location: class RenderScriptImageEdit
<path to code>/utils/RenderScriptImageEdit.java:43: error: cannot find symbol
        ScriptC_histEq histEqScript = new ScriptC_histEq(rs);
                                          ^
  symbol:   class ScriptC_histEq
  location: class RenderScriptImageEdit

Renaming .rs to .rscript also did not work.

How to compile .rs files on AOSP 29 with Android.bp ?

Try like this https://cs.android.com/android/platform/superproject/+/master:cts/tests/tests/renderscript/Android.bp

Seems, they are building in different way instead of adding rs file as src directly

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM