user2488826
user2488826

Reputation: 49

build errors with renderscript using Android studio 0.2.3; 4.3 SDK

I receive the errors below while upgrading to the newest studio (0.2.3) and newest SDK (4.3). I have a few non-root functions in my renderscript file and the compiler gives a error that these functions are not supported in SDK levels 11-15. Therefore, I set my level to 16 in the build.gradle and the manifest file. I am not sure why I have to do this twice. Maybe the manifest is not used anymore. After changing to 16 level I noticed that the error below still shows "-target-api 11". How do I get around this problem? I had these non-root functions in my renderscript file before this upgrade.

Thanks,

Gradle: C:\Users\tec\workspace\Hunting\Hunting360\src\bw.rs:66:6: error: Non-root compute kernel convert_to_bw() is not supported in SDK levels 11-15 C:\Users\tec\workspace\Hunting\Hunting360\src\bw.rs:86:6: error: Non-root compute kernel init_history() is not supported in SDK levels 11-15 C:\Users\tec\workspace\Hunting\Hunting360\src\bw.rs:92:6: error: Non-root compute kernel Black_White_Process() is not supported in SDK levels 11-15

FAILURE: Build failed with an exception.

Upvotes: 0

Views: 1126

Answers (2)

Sunil
Sunil

Reputation: 3

  1. You should use the SDK version and build tool of same version.
  2. In the project property file add the below statement .

    renderscript.target =18
    renderscript.support.mode = true
    sdk.buildtoos="choose depanding on the API level"
    
  3. Classes using RenderScript , add the below import statement.

    import android.support.v8.renderscript.*;
    

Please check may be this will be helpful .

Upvotes: 1

R. Jason Sams
R. Jason Sams

Reputation: 1469

Can you post the function signatures for the 3 functions causing issues? A large number of warnings and errors were added to catch minor mistakes. If this is an internal function not called from Java code, you probably just need to mark it static.

Upvotes: 0

Related Questions